Sha256: 4e6f804960f6c300a9d6529ec15d6e5353d00124714c6ca2ae1aca7300266f87
Contents?: true
Size: 448 Bytes
Versions: 15
Compression:
Stored size: 448 Bytes
Contents
require 'yaml' require 'lazyman/errors' require 'ostruct' module Lazyman class Config attr_reader :hash_content, :content def initialize filepath @f ||= filepath if valid?(filepath) File.open(@f) {|handle| @hash_content = YAML.load(handle)} @content = OpenStruct.new(@hash_content) end def valid?(filepath) raise ConfigFileMissingError unless File.exists?(filepath) true end end end #Lazyman
Version data entries
15 entries across 15 versions & 1 rubygems