add Value.zero class method
This commit is contained in:
1 parent
98198617be
commit
3828247993
1 file changed
+4
@@ -4,6 +4,10 @@ module Gnucash
|
||||
|
||||
attr_accessor :val
|
||||
|
||||
def self.zero
|
||||
Value.new(0)
|
||||
end
|
||||
|
||||
def initialize(val, div = 100)
|
||||
if val.is_a?(String)
|
||||
if val =~ /^(-?\d+)\/(\d+)$/
|
||||
|
||||
Reference in new issue
Block a user