Sha256: 7b7311527da4bf80aa217083958727b9cd5dfe95ae444b4e1f15c2f9bd8add44
Contents?: true
Size: 456 Bytes
Versions: 5
Compression:
Stored size: 456 Bytes
Contents
require 'yaml' class Configuration CONFIG_FILE = '.lockr' attr_reader :config def initialize() @config = nil if File.exists?( CONFIG_FILE) File.open( CONFIG_FILE, 'r') do |f| @config = YAML::load(f) end else filename = File.expand_path("~/#{CONFIG_FILE}") if File.exists?( filename) File.open( filename, 'r') do |f| @config = YAML::load(f) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
lockr-0.5.2 | lib/lockr/config.rb |
lockr-0.5.1 | lib/lockr/config.rb |
lockr-0.5.0 | lib/lockr/config.rb |
lockr-0.4.5 | lib/lockr/config.rb |
lockr-0.4.4 | lib/lockr/config.rb |