require 'yaml' require 'active_support/core_ext/hash/indifferent_access' module Pears module Provider # Used for loading simple YAML file locally. class LocalFile < Base def initialize(file_path) yaml_data = File.read(file_path) @data = parse_yaml(yaml_data) end private def parse_yaml(yaml_data) YAML.load(yaml_data).with_indifferent_access end end end end