class YleTf::Config::File

Attributes

name[R]

Public Class Methods

new(name) click to toggle source
# File lib/yle_tf/config/file.rb, line 12
def initialize(name)
  @name = name.to_s
end

Public Instance Methods

read() click to toggle source
# File lib/yle_tf/config/file.rb, line 16
def read
  YAML.load_file(name) || {}
rescue StandardError => e
  Logger.fatal("Failed to load or parse configuration from '#{name}'")
  raise e
end
to_s() click to toggle source
# File lib/yle_tf/config/file.rb, line 23
def to_s
  name
end