class Financials
Attributes
statements[RW]
symbol[RW]
timeframe[RW]
type[RW]
Public Class Methods
new(params,type)
click to toggle source
# File lib/financials.rb, line 5 def initialize(params,type) @type = type statements = params["statement"] @symbol = params["symbol"] @timeframe = params["timeframe"] @statements = [] if type == INCOME_STATEMENT statements.each { |statement| @statements << IncomeStatement.new(statement) } elsif type == BALANCE_SHEET statements.each { |statement| @statements << BalanceSheet.new(statement) } end end