Class: Financial::Balance
- Inherits:
-
Object
- Object
- Financial::Balance
- Defined in:
- lib/financial/balance.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(balance_value, balance_date) ⇒ Balance
constructor
A new instance of Balance.
Constructor Details
#initialize(balance_value, balance_date) ⇒ Balance
Returns a new instance of Balance.
5 6 7 8 9 |
# File 'lib/financial/balance.rb', line 5 def initialize(balance_value, balance_date) @name = Financial.locale.balance_name @value = balance_value @date = balance_date.is_a?(Date) ? balance_date : Financial::FinancialDate.new(balance_date).date end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
3 4 5 |
# File 'lib/financial/balance.rb', line 3 def date @date end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/financial/balance.rb', line 3 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/financial/balance.rb', line 3 def value @value end |