lib/repper/format.rb in repper-1.0.0 vs lib/repper/format.rb in repper-1.1.0
- old
+ new
@@ -1,11 +1,12 @@
module Repper
module Format
def self.cast(arg)
case arg
when ::Proc then arg
+ when :x then Format::Extended
when ::Symbol, ::String then Format.const_get(arg.capitalize) rescue nil
- when false, nil then Format::Plain
+ when false, nil then Format::Inline
end || raise(Repper::ArgumentError, "unknown format #{arg.inspect}")
end
end
end