store account description
This commit is contained in:
parent
326dbd3fcd
commit
aa3b65d1e2
@ -4,6 +4,9 @@ module Gnucash
|
|||||||
# _String_: The name of the account (unqualified)
|
# _String_: The name of the account (unqualified)
|
||||||
attr_reader :name
|
attr_reader :name
|
||||||
|
|
||||||
|
# _String_: The account description
|
||||||
|
attr_reader :description
|
||||||
|
|
||||||
# _String_: The account type (such as "EXPENSE")
|
# _String_: The account type (such as "EXPENSE")
|
||||||
attr_reader :type
|
attr_reader :type
|
||||||
|
|
||||||
@ -26,6 +29,7 @@ module Gnucash
|
|||||||
@node = node
|
@node = node
|
||||||
@name = node.xpath('act:name').text
|
@name = node.xpath('act:name').text
|
||||||
@type = node.xpath('act:type').text
|
@type = node.xpath('act:type').text
|
||||||
|
@description = node.xpath('act:description').text
|
||||||
@id = node.xpath('act:id').text
|
@id = node.xpath('act:id').text
|
||||||
@parent_id = node.xpath('act:parent').text
|
@parent_id = node.xpath('act:parent').text
|
||||||
@parent_id = nil if @parent_id == ""
|
@parent_id = nil if @parent_id == ""
|
||||||
|
@ -13,6 +13,10 @@ module Gnucash
|
|||||||
@salary.name.should == "Salary"
|
@salary.name.should == "Salary"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "gives access to the account description" do
|
||||||
|
@checking.description.should == "Checking Account"
|
||||||
|
end
|
||||||
|
|
||||||
it "gives access to the fully-qualified account name" do
|
it "gives access to the fully-qualified account name" do
|
||||||
@checking.full_name.should == "Assets::Current Assets::Checking Account"
|
@checking.full_name.should == "Assets::Current Assets::Checking Account"
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user