lib/osheet/format.rb in osheet-1.0.0.rc.2 vs lib/osheet/format.rb in osheet-1.0.0.rc.3

- old
+ new

@@ -18,10 +18,10 @@ :text, :special, :custom ] class << self def new(type, *args) - unless VALUES.include?(type) + unless VALUES.include?(type.to_sym) raise ArgumentError, "'#{type.inspect}' is not a valid format type" end self.const_get(type.to_s.capitalize).new(*args) end end