Class: Excalibur::Generators::DecoratorGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/excalibur/decorator_generator.rb

Overview

allows you to use rails generate to create a new scaffolded decorator for a application native class. rails g excalibur:decorator [class_name]

Instance Method Summary collapse

Instance Method Details

#create_decoratorObject



13
14
15
# File 'lib/generators/excalibur/decorator_generator.rb', line 13

def create_decorator
  template 'decorator.rb', "app/decorators/excalibur/#{file_name}_decorator.rb"
end