Class: JsonTail::Config

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#yamlObject (readonly)

Returns the value of attribute yaml.



3
4
5
# File 'lib/json_tail/config.rb', line 3

def yaml
  @yaml
end

Class Method Details

.parse_yml(file, hash = {}) ⇒ Object



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

def parse_yml(file, hash = {})
  @yaml = YAML::load(File.open(file))[hash]
end