class Msg91ruby::Sources::YAMLSource
Attributes
path[RW]
Public Class Methods
new(path)
click to toggle source
# File lib/msg91ruby/sources/yaml_source.rb, line 10 def initialize(path) @path = path end
Public Instance Methods
load()
click to toggle source
returns a config hash from the YML file
# File lib/msg91ruby/sources/yaml_source.rb, line 15 def load if @path and File.exists?(@path.to_s) result = YAML.load(ERB.new(IO.read(@path.to_s)).result) end result || {} end