Class: Jewelbox::Config::Section
Overview
Description
Inner class that represents a section
Instance Method Summary collapse
- #add(key, value) ⇒ Object
-
#initialize(name) ⇒ Section
constructor
A new instance of Section.
Constructor Details
#initialize(name) ⇒ Section
Returns a new instance of Section.
97 98 99 100 |
# File 'lib/jewelbox/config.rb', line 97 def initialize(name) @name = name @data = {} end |
Instance Method Details
#add(key, value) ⇒ Object
101 102 103 104 |
# File 'lib/jewelbox/config.rb', line 101 def add(key, value) @data[key] = value eigenclass.send(:define_method, key) { value } end |