class FortuneTeller::Account

Representation of an account being simulated with FortuneTeller

Attributes

balance[R]
holder[R]
type[R]

Public Class Methods

new(holder:, type:, balance: 0) click to toggle source
# File lib/fortuneteller/account.rb, line 5
def initialize(holder:, type:, balance: 0)
  @holder = holder
  @type = type
  @balance = balance
end

Public Instance Methods

initial_state(start_date:) click to toggle source
# File lib/fortuneteller/account.rb, line 11
def initial_state(start_date:)
  self.class::State.new(
    start_date: start_date,
    balance: @balance,
    account_ref: self
  )
end