Class: MizuhoBank::MizuhoCacheFlow

Inherits:
Object
  • Object
show all
Defined in:
lib/mizuho_bank.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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(options={})
  options.each{ |key, value|
    instance_variable_set("@#{key}", value)
  }
end

Instance Attribute Details

#dateObject

Returns the value of attribute date.



407
408
409
# File 'lib/mizuho_bank.rb', line 407

def date
  @date
end

#money_inObject

Returns the value of attribute money_in.



409
410
411
# File 'lib/mizuho_bank.rb', line 409

def money_in
  @money_in
end

#money_outObject

Returns the value of attribute money_out.



410
411
412
# File 'lib/mizuho_bank.rb', line 410

def money_out
  @money_out
end

#summaryObject

Returns the value of attribute summary.



408
409
410
# File 'lib/mizuho_bank.rb', line 408

def summary
  @summary
end

Instance Method Details

#to_sObject



422
423
424
# File 'lib/mizuho_bank.rb', line 422

def to_s
  "#<MizuhoCacheFlow: #{@date.strftime("%Y/%m/%d")} #{@summary} #{self.value}>"
end

#valueObject



418
419
420
# File 'lib/mizuho_bank.rb', line 418

def value
  @money_in == 0 ? -@money_out : @money_in
end