Module: YfAsDataframe::Financials
- Includes:
- ActiveSupport::Inflector
- Included in:
- Ticker
- Defined in:
- lib/yf_as_dataframe/financials.rb
Class Method Summary collapse
-
.included(base) ⇒ Object
built-in Ruby hook for modules.
Instance Method Summary collapse
- #balance_sheet ⇒ Object (also: #annual_balance_sheet, #annual_balancesheet)
- #cash_flow ⇒ Object (also: #cashflow, #annual_cashflow, #annual_cash_flow)
- #income_stmt ⇒ Object (also: #annual_incomestmt, #annual_income_stmt, #annual_financials)
- #initialize_financials ⇒ Object
- #quarterly_balance_sheet ⇒ Object (also: #quarterly_balancesheet)
- #quarterly_cash_flow ⇒ Object (also: #quarterly_cashflow)
- #quarterly_income_stmt ⇒ Object (also: #quarterly_incomestmt, #quarterly_financials)
Class Method Details
.included(base) ⇒ Object
built-in Ruby hook for modules
8 9 10 11 12 13 14 15 16 |
# File 'lib/yf_as_dataframe/financials.rb', line 8 def self.included(base) # built-in Ruby hook for modules base.class_eval do original_method = instance_method(:initialize) define_method(:initialize) do |*args, &block| original_method.bind(self).call(*args, &block) initialize_financials # (your module code here) end end end |
Instance Method Details
#balance_sheet ⇒ Object Also known as: annual_balance_sheet, annual_balancesheet
32 |
# File 'lib/yf_as_dataframe/financials.rb', line 32 def balance_sheet; _get_balance_sheet(pretty: true); end |
#cash_flow ⇒ Object Also known as: cashflow, annual_cashflow, annual_cash_flow
38 |
# File 'lib/yf_as_dataframe/financials.rb', line 38 def cash_flow; _get_cash_flow(pretty: true, freq: 'yearly'); end |
#income_stmt ⇒ Object Also known as: annual_incomestmt, annual_income_stmt, annual_financials
24 |
# File 'lib/yf_as_dataframe/financials.rb', line 24 def income_stmt; _get_income_stmt(pretty: true); end |
#initialize_financials ⇒ Object
18 19 20 21 22 |
# File 'lib/yf_as_dataframe/financials.rb', line 18 def initialize_financials @income_time_series = {} @balance_sheet_time_series = {} @cash_flow_time_series = {} end |
#quarterly_balance_sheet ⇒ Object Also known as: quarterly_balancesheet
33 |
# File 'lib/yf_as_dataframe/financials.rb', line 33 def quarterly_balance_sheet; _get_balance_sheet(pretty: true, freq: 'quarterly'); end |
#quarterly_cash_flow ⇒ Object Also known as: quarterly_cashflow
40 |
# File 'lib/yf_as_dataframe/financials.rb', line 40 def quarterly_cash_flow; _get_cash_flow(pretty: true, freq: 'quarterly'); end |
#quarterly_income_stmt ⇒ Object Also known as: quarterly_incomestmt, quarterly_financials
25 |
# File 'lib/yf_as_dataframe/financials.rb', line 25 def quarterly_income_stmt; _get_income_stmt(pretty: true, freq: 'quarterly'); end |