lib/osheet/format.rb in osheet-0.10.0 vs lib/osheet/format.rb in osheet-1.0.0.rc.1

- old
+ new

@@ -11,20 +11,20 @@ require 'osheet/format/custom' module Osheet::Format VALUES = [ - :general,:number, :currency, :accounting, + :general, :number, :currency, :accounting, :datetime, :percentage, :fraction, :scientific, :text, :special, :custom ] class << self - def new(type, opts={}) + def new(type, *args) unless VALUES.include?(type) raise ArgumentError, "'#{type.inspect}' is not a valid format type" end - self.const_get(type.to_s.capitalize).new(opts) + self.const_get(type.to_s.capitalize).new(*args) end end end