Module: ConfigureMe::Nesting::InstanceMethods
- Defined in:
- lib/configure_me/nesting.rb
Instance Method Summary collapse
Instance Method Details
#all_configs ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/configure_me/nesting.rb', line 43 def all_configs res = [self] children.values.each do |child| res.concat(child.all_configs) end res end |
#children ⇒ Object
39 40 41 |
# File 'lib/configure_me/nesting.rb', line 39 def children @children ||= {} end |
#parent_config ⇒ Object
35 36 37 |
# File 'lib/configure_me/nesting.rb', line 35 def parent_config self.class.parent_config_klass ? self.class.parent_config_klass.new : nil end |