Module: SmartCore::Initializer::InstanceAttributeAccessing Private
- Defined in:
- lib/smart_core/initializer/instance_attribute_accessing.rb
Overview
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
- #__collect_options__ ⇒ Hash<Symbol,Any> private
- #__collect_params__ ⇒ Hash<Symbol,Any> private
- #attributes ⇒ Hash<Symbol,Any>
- #options ⇒ Hash<Symbol,Any>
- #params ⇒ Hash<Symbol,Any>
Instance Method Details
#__collect_options__ ⇒ Hash<Symbol,Any>
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.
44 45 46 47 48 |
# File 'lib/smart_core/initializer/instance_attribute_accessing.rb', line 44 def self.class..each_with_object({}) do |option, memo| memo[option.name] = instance_variable_get("@#{option.name}") end end |
#__collect_params__ ⇒ Hash<Symbol,Any>
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.
34 35 36 37 38 |
# File 'lib/smart_core/initializer/instance_attribute_accessing.rb', line 34 def __collect_params__ self.class.__params__.each_with_object({}) do |param, memo| memo[param.name] = instance_variable_get("@#{param.name}") end end |
#attributes ⇒ Hash<Symbol,Any>
26 27 28 |
# File 'lib/smart_core/initializer/instance_attribute_accessing.rb', line 26 def attributes __collect_params__.merge() end |
#options ⇒ Hash<Symbol,Any>
18 19 20 |
# File 'lib/smart_core/initializer/instance_attribute_accessing.rb', line 18 def end |
#params ⇒ Hash<Symbol,Any>
10 11 12 |
# File 'lib/smart_core/initializer/instance_attribute_accessing.rb', line 10 def params __collect_params__ end |