Class: Pod::Rc

Inherits:
Object
  • Object
show all
Defined in:
lib/pod/rc.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ Rc

Returns a new instance of Rc.



5
6
7
8
9
10
11
# File 'lib/pod/rc.rb', line 5

def initialize(path)
  begin
    @config = YAML.load_file(path) || {}
  rescue
    @config = {}
  end
end

Instance Method Details

#[](key) ⇒ Object



13
14
15
# File 'lib/pod/rc.rb', line 13

def [](key)
  @config[key]
end