Module: Virtus::InstanceMethods::Constructor
- Defined in:
- lib/virtus/instance_methods.rb
Instance Method Summary collapse
-
#initialize(attributes = nil) ⇒ undefined
private
Set attributes during initialization of an object.
Instance Method Details
#initialize(attributes = nil) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Set attributes during initialization of an object
16 17 18 19 |
# File 'lib/virtus/instance_methods.rb', line 16 def initialize(attributes = nil) attribute_set.set(self, attributes) if attributes set_default_attributes end |