Sha256: b5c9287e6bb4a0b5175660a30ff544bfe83daa56c4a5f2375648c4c80faf9dd2
Contents?: true
Size: 478 Bytes
Versions: 1
Compression:
Stored size: 478 Bytes
Contents
require 'yaml' module Instapusher module Configuration extend self @_settings = {} attr_reader :_settings def load(filename=nil) filename ||= File.join(ENV['HOME'], '.instapusher') unless File.exist? filename File.new(filename, File::CREAT|File::TRUNC|File::RDWR, 0644).close end @_settings = YAML::load_file(filename) || {} end def method_missing(name, *args, &block) @_settings[name.to_s] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
instapusher-0.0.3 | lib/instapusher/configuration.rb |