Class: Econfig::YAML

Inherits:
Object
  • Object
show all
Defined in:
lib/econfig/yaml.rb

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ YAML

Returns a new instance of YAML.



6
7
8
9
10
# File 'lib/econfig/yaml.rb', line 6

def initialize(path)
  @path = path
  @mutex = Mutex.new
  @options = nil
end

Instance Method Details

#get(key) ⇒ Object



16
17
18
# File 'lib/econfig/yaml.rb', line 16

def get(key)
  options[key]
end

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/econfig/yaml.rb', line 20

def has_key?(key)
  options.has_key?(key)
end

#keysObject



12
13
14
# File 'lib/econfig/yaml.rb', line 12

def keys
  Set.new(options.keys)
end