Sha256: dbc5794d33327ed299d37d6c54370faf883a3d5fa78100368b22d60a0583633c

Contents?: true

Size: 999 Bytes

Versions: 3

Compression:

Stored size: 999 Bytes

Contents

class SimpleManifest
  def self.populate_record(m, rule_name ,rule_class)

    %W(
      app/rules
      app/views/re_rule_definitions/#{rule_name}
      lib/tasks
      spec/lib/rules
    ).each do |dirname|
      m.directory dirname
    end

    %W(
    ).each do |filename|
      m.file filename, filename
    end

   m.template "app/rules/simple.rb",  "app/rules/#{rule_name}.rb"
   m.template "app/views/re_rule_definitions/simple/_edit.html.erb",  "app/views/re_rule_definitions/#{rule_name}/_edit.html.erb"
   m.template "app/views/re_rule_definitions/simple/_form.html.erb",  "app/views/re_rule_definitions/#{rule_name}/_form.html.erb"
   m.template "app/views/re_rule_definitions/simple/_help.html.erb",  "app/views/re_rule_definitions/#{rule_name}/_help.html.erb"
   m.template "app/views/re_rule_definitions/simple/_new.html.erb",  "app/views/re_rule_definitions/#{rule_name}/_new.html.erb"
   m.template "spec/lib/rules/simple_spec.rb",  "spec/lib/rules/#{rule_name}_spec.rb"

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rules_engine-0.1.6 rails_generators/manifests/simple.rb
rules_engine-0.1.5 rails_generators/manifests/simple.rb
rules_engine-0.1.4 rails_generators/manifests/simple.rb