add placeholder account attribute

This commit is contained in:
josh committed 2013-08-31 16:27:47 -04:00
1 parent 9ee49d949d
commit 4e882e60dc
2 files changed
+16

No files matched your search

+7
View File
@@ -14,6 +14,9 @@ module Gnucash
# account.
attr_accessor :transactions
# Boolean: whether the account is a placeholder or not
attr_accessor :placeholder
# Create an Account object.
# === Arguments
# +book+ _Book_:: The Gnucash::Book containing the account
@@ -28,6 +31,10 @@ module Gnucash
@parent_id = nil if @parent_id == ""
@transactions = []
@balances = []
@placeholder = node.xpath("act:slots/slot").find do |slot|
(slot.xpath("slot:key").first.text == "placeholder" and
slot.xpath("slot:value").first.text == "true")
end
end
# Return the fully qualified account name