Sha256: 154110abaa41285d9dd30d718804a1839258d3f7270c8766cf05d847aa2c33c5

Contents?: true

Size: 405 Bytes

Versions: 10

Compression:

Stored size: 405 Bytes

Contents

# frozen_string_literal: true

module Rails
  module Generators
    class DecoratorGenerator < NamedBase
      source_root File.expand_path("templates", __dir__)
      check_class_collision suffix: "Decorator"

      def create_decorator_file
        template 'decorator.rb', File.join('app/decorators', class_path, "#{file_name}_decorator.rb")
      end

      hook_for :test_framework
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
active_decorator-1.4.1 lib/generators/rails/decorator_generator.rb
active_decorator-1.4.0 lib/generators/rails/decorator_generator.rb
active_decorator-1.3.4 lib/generators/rails/decorator_generator.rb
active_decorator-1.3.3 lib/generators/rails/decorator_generator.rb
active_decorator-1.3.2 lib/generators/rails/decorator_generator.rb
active_decorator-1.3.1 lib/generators/rails/decorator_generator.rb
active_decorator-1.3.0 lib/generators/rails/decorator_generator.rb
active_decorator-1.2.0 lib/generators/rails/decorator_generator.rb
active_decorator-1.1.1 lib/generators/rails/decorator_generator.rb
active_decorator-1.1.0 lib/generators/rails/decorator_generator.rb