Class: CouchPopulator::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/couchpopulator/base.rb

Instance Method Summary collapse

Constructor Details

#initialize(options, called_from_command_line = false) ⇒ Base

Returns a new instance of Base.



3
4
5
6
7
8
# File 'lib/couchpopulator/base.rb', line 3

def initialize(options, called_from_command_line = false)
  @options = options

  @options[:couch_url] = CouchHelper.get_full_couchurl options[:couch] unless @options[:couch].nil?
  @options.merge!(@options[:executor_klass].command_line_options) if called_from_command_line
end

Instance Method Details

#populateObject



10
11
12
# File 'lib/couchpopulator/base.rb', line 10

def populate
  @options[:executor_klass].new(@options).execute
end