Class: Econfig::YAML

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

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ YAML

Returns a new instance of YAML.



8
9
10
11
12
# File 'lib/blueprint_config/yaml.rb', line 8

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

Instance Method Details

#get(key) ⇒ Object



18
19
20
# File 'lib/blueprint_config/yaml.rb', line 18

def get(key)
  options[key]
end

#has_key?(key) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/blueprint_config/yaml.rb', line 22

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

#keysObject



14
15
16
# File 'lib/blueprint_config/yaml.rb', line 14

def keys
  Set.new(options.keys)
end