Class: Sunrise::Config::Model
Instance Attribute Summary collapse
-
#sections ⇒ Object
readonly
Returns the value of attribute sections.
Attributes inherited from Base
#abstract_model, #name, #parent
Instance Method Summary collapse
- #associations ⇒ Object
-
#initialize(abstract_model, parent = nil, options = nil) ⇒ Model
constructor
A new instance of Model.
Methods inherited from Base
register_class_option, register_instance_option, #register_instance_option
Constructor Details
#initialize(abstract_model, parent = nil, options = nil) ⇒ Model
Returns a new instance of Model.
14 15 16 17 |
# File 'lib/sunrise/config/model.rb', line 14 def initialize(abstract_model, parent = nil, = nil) super @sections ||= {} end |
Instance Attribute Details
#sections ⇒ Object (readonly)
Returns the value of attribute sections.
12 13 14 |
# File 'lib/sunrise/config/model.rb', line 12 def sections @sections end |
Instance Method Details
#associations ⇒ Object
43 44 45 |
# File 'lib/sunrise/config/model.rb', line 43 def associations @associations ||= @sections.select { |key, value| key.to_s.include?('association_') }.values end |