Class: Uchi::RepositoryGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/uchi/repository/repository_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_repository_fileObject



7
8
9
10
# File 'lib/generators/uchi/repository/repository_generator.rb', line 7

def create_repository_file
  destination = File.join("app/uchi/repositories")
  template "repository.rb", File.join(destination, "#{file_name}.rb")
end

#generate_controllerObject



12
13
14
# File 'lib/generators/uchi/repository/repository_generator.rb', line 12

def generate_controller
  generate("uchi:controller", name)
end