Class: DataCatalog::ImporterFramework::Puller

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

Constant Summary collapse

REQUIRED =
%w(cache_folder puller)

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Puller

Returns a new instance of Puller.



7
8
9
10
11
12
# File 'lib/puller.rb', line 7

def initialize(options)
  REQUIRED.each do |r|
    raise Error, "option :#{r} is required" unless options[r.intern]
  end
  @options = options
end

Instance Method Details

#runObject



14
15
16
17
18
19
20
# File 'lib/puller.rb', line 14

def run
  Utility.report_timing "pull" do
    handler = Handler.new(@options)
    puller = @options[:puller].new(handler)
    puller.run
  end
end