Class: Ytterb::StockSymbol::Report

Inherits:
Object
  • Object
show all
Defined in:
lib/ytterb/stock_symbol/report.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Report

Returns a new instance of Report.



9
10
11
12
13
14
15
16
17
18
# File 'lib/ytterb/stock_symbol/report.rb', line 9

def initialize(options={})
  if options[:type]
    case options[:type]
    when :freshness
      @report = Freshness.new
    else
      raise "unknown report type #{options[:type]}"
    end
  end
end

Instance Method Details

#generateObject



20
21
22
23
# File 'lib/ytterb/stock_symbol/report.rb', line 20

def generate
  @report.process
  puts @report.output
end