Class: Jarl::Config
- Inherits:
-
Object
- Object
- Jarl::Config
- Defined in:
- lib/jarl/config.rb
Instance Attribute Summary collapse
-
#params ⇒ Object
readonly
Returns the value of attribute params.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #[](key) ⇒ Object
-
#initialize(path) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(path) ⇒ Config
Returns a new instance of Config.
8 9 10 11 |
# File 'lib/jarl/config.rb', line 8 def initialize(path) @path = Pathname.new(path). load end |
Instance Attribute Details
#params ⇒ Object (readonly)
Returns the value of attribute params.
6 7 8 |
# File 'lib/jarl/config.rb', line 6 def params @params end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
6 7 8 |
# File 'lib/jarl/config.rb', line 6 def path @path end |
Instance Method Details
#[](key) ⇒ Object
13 14 15 |
# File 'lib/jarl/config.rb', line 13 def [](key) @params[key] end |