lib/papla.rb in papla-0.1.2 vs lib/papla.rb in papla-0.2.0
- old
+ new
@@ -1,9 +1,9 @@
require 'papla/backend'
module Papla
- autoload :FixnumConverter, 'papla/fixnum_converter'
+ autoload :IntegerConverter, 'papla/integer_converter'
autoload :FloatConverter, 'papla/float_converter'
autoload :MoneyConverter, 'papla/money_converter'
# Converts a number to Polish or English words,
# capitalizing the first letter of the whole phrase.
@@ -66,10 +66,10 @@
def self.converter_for(number)
case number
when defined?(Money) && Money then MoneyConverter
when Float then FloatConverter
- when Fixnum then FixnumConverter
- else raise ArgumentError, "Unsupported type: #{klass}"
+ when Integer then IntegerConverter
+ else raise ArgumentError, "Unsupported type: #{number.class}"
end
end
end