Class: ValidateableObject

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Validations
Defined in:
lib/validates_serialized/validateable_object.rb

Direct Known Subclasses

ValidateableArrayValue, ValidateableHash

Instance Method Summary collapse

Methods included from ActiveModel::Validations

#validates_array_values_with, #validates_hash_values_with, #validates_serialized_with!

Constructor Details

#initialize(object) ⇒ ValidateableObject

Returns a new instance of ValidateableObject.



6
7
8
# File 'lib/validates_serialized/validateable_object.rb', line 6

def initialize(object)
  @object = object
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object (private)



11
12
13
14
# File 'lib/validates_serialized/validateable_object.rb', line 11

def method_missing(method, *args, &block)
  @object.send(method, *args, &block)
rescue NoMethodError => e
end