Module: MyApiClient::GeneratorHelper
- Defined in:
- lib/generators/generator_helper.rb
Overview
The helper module for source generators
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
6 7 8 |
# File 'lib/generators/generator_helper.rb', line 6 def self.included(base) base.include(Rails::Generators::ResourceHelpers) end |
Instance Method Details
#yeild_request_arguments ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/generators/generator_helper.rb', line 10 def yeild_request_arguments requests.each do |request| http_method, pathname = request.split(':') action = "#{http_method}_#{pathname.tr('/', '_')}" yield action, http_method, pathname end end |