Sha256: d709e3f851bc926f305ead5ebb5320fea0f7a89fd2e855326201a6b0c0c99afb
Contents?: true
Size: 1009 Bytes
Versions: 1
Compression:
Stored size: 1009 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + "/generator_manifest") require File.expand_path(File.dirname(__FILE__) + "/template_manifest") require File.expand_path(File.dirname(__FILE__) + "/blacklist_word_manifest") require File.expand_path(File.dirname(__FILE__) + "/simple_manifest") class RulesEngineGenerator < Rails::Generator::Base attr_reader :rule_name, :rule_class def initialize(runtime_args, runtime_options = {}) super end def after_generate end def manifest @rule_name = args[0] || 'generator' @rule_class = @rule_name.camelize record do |m| if (@rule_name == 'generator') GeneratorManifest.populate_record(m) m.readme './../USAGE' elsif (@rule_name == 'blacklist_word') BlacklistWordManifest.populate_record(m) elsif (@rule_name == 'simple') Simple.populate_record(m) else TemplateManifest.populate_record(m, @rule_name) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rules_engine-0.0.1 | rails_generators/rules_engine_generator.rb |