Class: Jarl::Config

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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).expand_path
  load
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



6
7
8
# File 'lib/jarl/config.rb', line 6

def params
  @params
end

#pathObject (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