Sha256: 6edb14d03def806e09797de56a3ac8785f402badca74f4264609b0662fa1db6c

Contents?: true

Size: 586 Bytes

Versions: 27

Compression:

Stored size: 586 Bytes

Contents

module Deface
  module Generators
    class OverrideGenerator < Rails::Generators::Base
      desc "Generates deface overrides"
      source_root File.expand_path("../templates", __FILE__)
      class_option :template_engine, :desc => 'Template engine to be invoked (erb or haml).'
      argument :view, :type => :string
      argument :name, :type => :string, :default => 'override'

      def copy_template
        engine = options[:template_engine]
        copy_file "override.html.#{engine}.deface", "app/overrides/#{view}/#{name}.html.#{engine}.deface"
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
deface-1.9.0 lib/generators/deface/override_generator.rb
deface-1.8.2 lib/generators/deface/override_generator.rb
deface-1.8.1 lib/generators/deface/override_generator.rb
deface-1.8.0 lib/generators/deface/override_generator.rb
deface-1.7.0 lib/generators/deface/override_generator.rb
deface-1.6.2 lib/generators/deface/override_generator.rb
deface-1.6.1 lib/generators/deface/override_generator.rb
deface-1.6.0 lib/generators/deface/override_generator.rb
deface-1.5.3 lib/generators/deface/override_generator.rb
deface-1.5.2 lib/generators/deface/override_generator.rb
deface-1.5.1 lib/generators/deface/override_generator.rb
deface-1.5.0 lib/generators/deface/override_generator.rb
deface-1.4.0 lib/generators/deface/override_generator.rb
deface-1.3.2 lib/generators/deface/override_generator.rb
deface-1.3.1 lib/generators/deface/override_generator.rb
deface-1.3.0 lib/generators/deface/override_generator.rb
deface-1.2.0 lib/generators/deface/override_generator.rb
deface-1.1.0 lib/generators/deface/override_generator.rb
deface-1.0.2 lib/generators/deface/override_generator.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/deface-1.0.1/lib/generators/deface/override_generator.rb