Class: Clook::Yaml

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

Class Method Summary collapse

Class Method Details

.fetch(value) ⇒ Object



10
11
12
13
14
# File 'lib/clook/yaml.rb', line 10

def fetch value
  file = File.read(@path)
  data = YAML::load(file)
  data[value]
end

.initialize(path) ⇒ Object



6
7
8
# File 'lib/clook/yaml.rb', line 6

def initialize path
  @path = path
end