Class: Generators::Avo::ResourceToolGenerator

Inherits:
NamedBaseGenerator
  • Object
show all
Defined in:
lib/generators/avo/resource_tool_generator.rb

Instance Method Summary collapse

Methods inherited from NamedBaseGenerator

#initialize

Constructor Details

This class inherits a constructor from Generators::Avo::NamedBaseGenerator

Instance Method Details

#handleObject



13
14
15
16
17
18
19
# File 'lib/generators/avo/resource_tool_generator.rb', line 13

def handle
  # Add configuration file
  template "resource_tools/resource_tool.tt", "app/avo/resource_tools/#{file_name}.rb"

  # Add view file
  template "resource_tools/partial.tt", "app/views/avo/resource_tools/_#{file_name}.html.erb"
end