Class: Alphavantage::Fundamental
- Inherits:
-
Object
- Object
- Alphavantage::Fundamental
- Defined in:
- lib/alphavantage/fundamental.rb
Constant Summary collapse
- FUNCTIONS =
{ overview: 'OVERVIEW', earnings: 'EARNINGS', income_statement: 'INCOME_STATEMENT', balance_sheet: 'BALANCE_SHEET', cash_flow: 'CASH_FLOW' }
Instance Method Summary collapse
- #balance_sheet ⇒ Object
- #cash_flow ⇒ Object
- #earnings ⇒ Object
- #income_statement ⇒ Object
-
#initialize(symbol:) ⇒ Fundamental
constructor
A new instance of Fundamental.
- #overview ⇒ Object
Constructor Details
#initialize(symbol:) ⇒ Fundamental
Returns a new instance of Fundamental.
11 12 13 |
# File 'lib/alphavantage/fundamental.rb', line 11 def initialize(symbol:) @symbol = symbol end |
Instance Method Details
#balance_sheet ⇒ Object
27 28 29 |
# File 'lib/alphavantage/fundamental.rb', line 27 def balance_sheet response(FUNCTIONS[__method__]).annual_reports end |
#cash_flow ⇒ Object
31 32 33 |
# File 'lib/alphavantage/fundamental.rb', line 31 def cash_flow response(FUNCTIONS[__method__]).annual_reports end |
#earnings ⇒ Object
19 20 21 |
# File 'lib/alphavantage/fundamental.rb', line 19 def earnings response(FUNCTIONS[__method__]).annual_earnings end |
#income_statement ⇒ Object
23 24 25 |
# File 'lib/alphavantage/fundamental.rb', line 23 def income_statement response(FUNCTIONS[__method__]).annual_reports end |
#overview ⇒ Object
15 16 17 |
# File 'lib/alphavantage/fundamental.rb', line 15 def overview response(FUNCTIONS[__method__]) end |