add Value.zero class method

This commit is contained in:
Josh Holtrop 2013-08-12 22:07:25 -04:00
parent 98198617be
commit 3828247993

View File

@ -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+)$/