Class: RockConfig::Config
- Inherits:
-
Object
- Object
- RockConfig::Config
show all
- Defined in:
- lib/rock_config/config.rb
Instance Method Summary
collapse
Constructor Details
#initialize(hash) ⇒ Config
Returns a new instance of Config.
3
4
5
|
# File 'lib/rock_config/config.rb', line 3
def initialize(hash)
@hash = hash
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
11
12
13
|
# File 'lib/rock_config/config.rb', line 11
def method_missing(name, *args, &block)
fetch(name.to_s)
end
|
Instance Method Details
#[](key) ⇒ Object
7
8
9
|
# File 'lib/rock_config/config.rb', line 7
def [](key)
fetch(key)
end
|
#raw ⇒ Object
15
16
17
|
# File 'lib/rock_config/config.rb', line 15
def raw
@hash.dup
end
|