Class: LedgerGen::Posting

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

Instance Method Summary collapse

Instance Method Details

#account(account) ⇒ Object



3
4
5
# File 'lib/ledger_gen/posting.rb', line 3

def ()
  @account = 
end

#amount(amount) ⇒ Object



7
8
9
# File 'lib/ledger_gen/posting.rb', line 7

def amount(amount)
  @amount = amount
end

#amount_stringObject



15
16
17
18
19
20
21
# File 'lib/ledger_gen/posting.rb', line 15

def amount_string
  if @amount.nil?
    ''
  else
    sprintf('$%0.2f', @amount)
  end
end

#to_sObject



11
12
13
# File 'lib/ledger_gen/posting.rb', line 11

def to_s
  "#{@account}  #{amount_string}"
end