class Wutang::Config
Attributes
attributes[R]
config_file[R]
Public Class Methods
new()
click to toggle source
# File lib/wutang/config.rb, line 5 def initialize @config_file = File.expand_path('~/.wutang.yml') parse end
Public Instance Methods
parse()
click to toggle source
# File lib/wutang/config.rb, line 10 def parse if File.world_readable?(config_file) puts "Your config file has world readable permissions" puts "Please run: chmod 640 ~/.wutang.yml" exit 1 elsif File.exists?(config_file) @attributes = YAML.load_file(config_file) else puts "Please create a ~/.wutang.yml with a `path` and `pasphrase`" exit 1 end end