Sha256: 77c61173005583be71239ba3bbd00c561ce8f14abac8b26a80c1c8bb4c60319f

Contents?: true

Size: 1.2 KB

Versions: 2

Compression:

Stored size: 1.2 KB

Contents

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

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

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

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

  end

  def self.after_generate(rule_name ,rule_class)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rules_engine_templates-0.0.5 rails_generators/manifests/tweet_filter.rb
rules_engine_templates-0.0.4 rails_generators/manifests/tweet_filter.rb