class EZ::Config
Constants
- DEFAULTS
Public Class Methods
configuration()
click to toggle source
# File lib/ez/config.rb, line 34 def self.configuration @config ||= begin if File.exist?(filename) DEFAULTS.merge YAML.load_file(filename) else DEFAULTS end end end
controllers?()
click to toggle source
# File lib/ez/config.rb, line 56 def self.controllers? configuration["controllers"] end
filename()
click to toggle source
# File lib/ez/config.rb, line 23 def self.filename @filename = begin n = File.join(Rails.root, '.ez') if File.exist?(n) n else File.expand_path('~/.ez') end end end
models?()
click to toggle source
# File lib/ez/config.rb, line 52 def self.models? configuration["models"] end
routes?()
click to toggle source
# File lib/ez/config.rb, line 48 def self.routes? configuration["restful_routes"] end
save!()
click to toggle source
# File lib/ez/config.rb, line 16 def self.save! File.open(filename,"w") do |file| file.write @config.to_yaml.sub(/^\-+$/,'') end @config end
timestamps?()
click to toggle source
# File lib/ez/config.rb, line 44 def self.timestamps? configuration["timestamps"] end
to_h()
click to toggle source
# File lib/ez/config.rb, line 12 def self.to_h configuration end
views?()
click to toggle source
# File lib/ez/config.rb, line 60 def self.views? configuration["views"] end