class Musket::Configuration
Public Class Methods
copy_templates()
click to toggle source
# File lib/musket/configuration.rb, line 20 def self.copy_templates FileUtils.mkdir(TEMPLATE_DIR) unless File.exists?TEMPLATE_DIR FileUtils.cp_r File.expand_path('../../templates', File.dirname(__FILE__)), CONFIG_DIR end
create()
click to toggle source
# File lib/musket/configuration.rb, line 9 def self.create FileUtils.mkdir(CONFIG_DIR) unless File.exists?CONFIG_DIR config = File.open(CONFIG_FILE, 'w+') data = { :author => "TODO: Write Author Name", :twitter => "TODO: Write Twitter Handle" } config.puts(data.to_yaml) config.close end
read()
click to toggle source
# File lib/musket/configuration.rb, line 3 def self.read config = File.open(CONFIG_FILE, 'r') output = YAML.load(config.read) return output end