class AbrilHeartbeat::ConfigLoader

Attributes

file_path[RW]

Public Class Methods

load() click to toggle source
# File lib/abril_heartbeat/config_loader.rb, line 7
def self.load
  @file ||= load_file
end
load_by_type(type) click to toggle source
# File lib/abril_heartbeat/config_loader.rb, line 11
def self.load_by_type(type)
  return load if load.empty?
  load.select { |_, v| v['type'] == type.to_s }
end
load_file() click to toggle source
# File lib/abril_heartbeat/config_loader.rb, line 16
def self.load_file
  return {} unless file_path

  ::YAML.load_file(file_path)
end