Class: Interage::Request::Generators::CreateGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Interage::Request::Generators::CreateGenerator
- Defined in:
- lib/generators/interage/request/create/create_generator.rb
Instance Method Summary collapse
- #create_request ⇒ Object
-
#initialize(args, *_options) ⇒ CreateGenerator
constructor
A new instance of CreateGenerator.
Constructor Details
#initialize(args, *_options) ⇒ CreateGenerator
Returns a new instance of CreateGenerator.
11 12 13 14 15 16 17 |
# File 'lib/generators/interage/request/create/create_generator.rb', line 11 def initialize(args, *) super @tab = ' ' @arguments = args @request_param = arguments.shift.to_s.underscore end |
Instance Method Details
#create_request ⇒ Object
19 20 21 22 23 24 25 26 27 |
# File 'lib/generators/interage/request/create/create_generator.rb', line 19 def create_request if create_base_request? template('base_request.rb', new_base_request_file) end template('request.rb', new_request_file) template('builder.rb', new_builder_file) end |