Class: GrapeCherry::Generators::ApiGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- GrapeCherry::Generators::ApiGenerator
- Defined in:
- lib/generators/grape_cherry/api_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_api_base ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/generators/grape_cherry/api_generator.rb', line 17 def generate_api_base # if File.exist? 'app/controllers/api/base.rb' # # else # template 'base.rb', 'app/controllers/api/base.rb' # end end |
#generate_api_endpoint ⇒ Object
29 30 31 32 |
# File 'lib/generators/grape_cherry/api_generator.rb', line 29 def generate_api_endpoint template 'resource.rb', file_path template 'helpers.rb', helpers_path end |
#generate_api_version ⇒ Object
25 26 27 |
# File 'lib/generators/grape_cherry/api_generator.rb', line 25 def generate_api_version end |