class Rledger::Reconciliation

Reconciliation maintains the reconciliation status of a Transaction

Attributes

status[R]

Public Instance Methods

discarded!() click to toggle source
# File lib/rledger/ledger/reconciliation.rb, line 14
def discarded!
  @status = '?'
end
discarded?() click to toggle source
# File lib/rledger/ledger/reconciliation.rb, line 18
def discarded?
  @status == '?'
end
parse(s) click to toggle source
# File lib/rledger/ledger/reconciliation.rb, line 42
def parse(s)
  case s
  when "*" then reconciled!
  when "!" then pending!
  when "?" then discarded!
  when ""  then unknown!
  else unknown!
  end
end
pending!() click to toggle source
# File lib/rledger/ledger/reconciliation.rb, line 6
def pending!
  @status = '!'
end
pending?() click to toggle source
# File lib/rledger/ledger/reconciliation.rb, line 10
def pending?
  @status == '!'
end
reconciled!() click to toggle source
# File lib/rledger/ledger/reconciliation.rb, line 22
def reconciled!
  @status = '*'
end
reconciled?() click to toggle source
# File lib/rledger/ledger/reconciliation.rb, line 26
def reconciled?
  @status == '*'
end
to_s() click to toggle source
# File lib/rledger/ledger/reconciliation.rb, line 38
def to_s
  @status
end
unknown!() click to toggle source
# File lib/rledger/ledger/reconciliation.rb, line 30
def unknown!
  @status = ''
end
unknown?() click to toggle source
# File lib/rledger/ledger/reconciliation.rb, line 34
def unknown?
  @status == ''
end