Class: MizuhoBank::MizuhoCacheFlow
- Inherits:
-
Object
- Object
- MizuhoBank::MizuhoCacheFlow
- Defined in:
- lib/mizuho_bank.rb
Instance Attribute Summary collapse
-
#date ⇒ Object
Returns the value of attribute date.
-
#money_in ⇒ Object
Returns the value of attribute money_in.
-
#money_out ⇒ Object
Returns the value of attribute money_out.
-
#summary ⇒ Object
Returns the value of attribute summary.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ MizuhoCacheFlow
constructor
A new instance of MizuhoCacheFlow.
- #to_s ⇒ Object
- #value ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ MizuhoCacheFlow
Returns a new instance of MizuhoCacheFlow.
412 413 414 415 416 |
# File 'lib/mizuho_bank.rb', line 412 def initialize(={}) .each{ |key, value| instance_variable_set("@#{key}", value) } end |
Instance Attribute Details
#date ⇒ Object
Returns the value of attribute date.
407 408 409 |
# File 'lib/mizuho_bank.rb', line 407 def date @date end |
#money_in ⇒ Object
Returns the value of attribute money_in.
409 410 411 |
# File 'lib/mizuho_bank.rb', line 409 def money_in @money_in end |
#money_out ⇒ Object
Returns the value of attribute money_out.
410 411 412 |
# File 'lib/mizuho_bank.rb', line 410 def money_out @money_out end |
#summary ⇒ Object
Returns the value of attribute summary.
408 409 410 |
# File 'lib/mizuho_bank.rb', line 408 def summary @summary end |
Instance Method Details
#to_s ⇒ Object
422 423 424 |
# File 'lib/mizuho_bank.rb', line 422 def to_s "#<MizuhoCacheFlow: #{@date.strftime("%Y/%m/%d")} #{@summary} #{self.value}>" end |
#value ⇒ Object
418 419 420 |
# File 'lib/mizuho_bank.rb', line 418 def value @money_in == 0 ? -@money_out : @money_in end |