Class: Rcap::Generators::ModelsGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/rcap/models/models_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details



13
14
15
# File 'lib/generators/rcap/models/models_generator.rb', line 13

def self.banner
  "rails generate rcap:models"
end

.source_rootObject



9
10
11
# File 'lib/generators/rcap/models/models_generator.rb', line 9

def self.source_root
  @_rcap_source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
end

Instance Method Details

#copy_lib_filesObject



21
22
23
# File 'lib/generators/rcap/models/models_generator.rb', line 21

def copy_lib_files
  copy_file 'modules/rcap.rb', 'lib/rcap.rb'
end

#copy_model_filesObject



17
18
19
# File 'lib/generators/rcap/models/models_generator.rb', line 17

def copy_model_files
  directory 'models', 'app/models'
end