Sha256: eed979c6ac26e958ac5363d57882ece7b5f7d8fc3e47703f1a545aae4389d306
Contents?: true
Size: 1.23 KB
Versions: 1
Compression:
Stored size: 1.23 KB
Contents
# encoding: utf-8 require File.join(File.dirname(__FILE__), 'default', 'base') module CSD # This namespace holds all individual application Modules # module Application # This is the root class of all Applications # module Default def name ActiveSupport::Inflector.underscore self.to_s.demodulize end def description about.description end def human about.human end def actions about.actions end def scopes(action) about.scopes[:action] end def options(action='') options_dir = File.join(Path.applications, name, 'options') common_file = File.join(options_dir, "common.rb") specific_file = File.join(options_dir, "#{action}.rb") common_options = File.file?(common_file) ? File.read(common_file) : '' specific_options = File.file?(specific_file) ? File.read(specific_file) : '' specific_options + common_options end protected def about about_file = File.join(Path.applications, name, 'about.yml') OpenStruct.new YAML.load_file(about_file) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
csd-0.1.5 | lib/csd/application/default.rb |