Class: GrapeCherry::Generators::ApiGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/grape_cherry/api_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_api_baseObject



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_endpointObject



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_versionObject



25
26
27
# File 'lib/generators/grape_cherry/api_generator.rb', line 25

def generate_api_version

end