Module: ROM::Initializer::InstanceMethods Private
- Defined in:
- core/lib/rom/initializer.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
-
#freeze ⇒ Object
This makes sure we memoize options before an object becomes frozen.
-
#options ⇒ Hash
Instance options.
Instance Method Details
#freeze ⇒ Object
This makes sure we memoize options before an object becomes frozen
78 79 80 81 |
# File 'core/lib/rom/initializer.rb', line 78 def freeze super end |
#options ⇒ Hash
Instance options
66 67 68 69 70 |
# File 'core/lib/rom/initializer.rb', line 66 def @__options__ ||= self.class.dry_initializer.definitions.values.each_with_object({}) do |item, obj| obj[item.target] = instance_variable_get(item.ivar) end end |