Module: ObjectAttorney

Defined in:
lib/object_attorney.rb,
lib/object_attorney/naming.rb,
lib/object_attorney/record.rb,
lib/object_attorney/helpers.rb,
lib/object_attorney/version.rb,
lib/object_attorney/delegation.rb,
lib/object_attorney/reflection.rb,
lib/object_attorney/translation.rb,
lib/object_attorney/validations.rb,
lib/object_attorney/serialization.rb,
lib/object_attorney/nested_objects.rb,
lib/object_attorney/representation.rb,
lib/object_attorney/attribute_assignment.rb,
lib/object_attorney/association_reflection.rb,
lib/object_attorney/orm_handlers/smooth_operator.rb

Defined Under Namespace

Modules: AttributeAssignment, ClassMethods, Delegation, Helpers, Naming, NestedObjects, OrmHandlers, Record, Representation, Serialization, Translation, Validations Classes: AssociationReflection, Reflection

Constant Summary collapse

VERSION =
"2.10.11"

Instance Method Summary collapse

Instance Method Details

#initialize(attributes = {}, object = nil) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/object_attorney.rb', line 19

def initialize(attributes = {}, object = nil)
  initialize_nested_attributes

  attributes, object = parsing_arguments(attributes, object)

  before_initialize(attributes)

  @represented_object ||= object

  assign_attributes attributes

  after_initialize(attributes)
end