Class: Couchbase::Generators::ConfigGenerator

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

Class Method Summary (collapse)

Instance Method Summary (collapse)

Class Method Details

+ (Object) source_root



29
30
31
# File 'lib/rails/generators/couchbase/config/config_generator.rb', line 29

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

Instance Method Details

- (Object) app_name



33
34
35
# File 'lib/rails/generators/couchbase/config/config_generator.rb', line 33

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

- (Object) create_config_file



37
38
39
# File 'lib/rails/generators/couchbase/config/config_generator.rb', line 37

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