Method: Migratrix::Extractions::Extraction#extract

Defined in:
lib/migratrix/extractions/extraction.rb

#extract(options = {}) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/migratrix/extractions/extraction.rb', line 17

def extract(options={})
  options = options.deep_copy
  options[:where] = Array(options[:where]) + Array(@options[:where])
  options = @options.merge(options).symbolize_keys

  # TODO: Raise error if self.abstract? DANGER/NOTE that this is
  # the "default strategy" for extraction, and may need to be
  # extracted to a strategy object.

  src = obtain_source(self.source, options)
  src = process_source(src, options)
  execute_extract(src, options)
end