Class: Jewelbox::Config::Section

Inherits:
Object
  • Object
show all
Defined in:
lib/jewelbox/config.rb

Overview

Description

Inner class that represents a section

Instance Method Summary collapse

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