Class: TableBeet::Runner

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

Instance Method Summary collapse

Constructor Details

#initialize(config = {}) ⇒ Runner



8
9
10
# File 'lib/table_beet/runner.rb', line 8

def initialize(config = {})
  @config = config
end

Instance Method Details

#runObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/table_beet/runner.rb', line 12

def run
  loader = TableBeet::Loader.new(@config)
  number_of_load = loader.load

  # TOOD logger..?
  if number_of_load.zero?
    puts '[warn] There are no loaded file with specified option.'
    puts "    finder => #{loader.display_pattern}"
  end

  TableBeet::Reporter.build(@config)
end