Class: CouchbaseOrm::Generators::ConfigGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/rails/generators/couchbase_orm/config/config_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



28
29
30
# File 'lib/rails/generators/couchbase_orm/config/config_generator.rb', line 28

def self.source_root
    @_couchbase_source_root ||= File.expand_path('../templates', __FILE__)
end

Instance Method Details

#app_nameObject



32
33
34
# File 'lib/rails/generators/couchbase_orm/config/config_generator.rb', line 32

def app_name
    Rails::Application.subclasses.first.parent.to_s.underscore
end

#create_config_fileObject



36
37
38
# File 'lib/rails/generators/couchbase_orm/config/config_generator.rb', line 36

def create_config_file
    template 'couchbase.yml', File.join('config', 'couchbase.yml')
end