lib/sinclair/caster.rb in sinclair-1.15.0 vs lib/sinclair/caster.rb in sinclair-1.16.0

- old
+ new

@@ -22,13 +22,17 @@ # Changes the class to be the master caster # # The master caster never checks with its an # # @example - # class MyCaster < Sinclair::Caster + # class BaseCaster < Sinclair::Caster + # cast_with(:string, :to_s) # end # + # class MyCaster < BaseCaster + # end + # # MyCaster.cast(10, :string) # returns '10' # # MyCaster.master_caster! # # MyCaster.cast(10, :string) # returns 10 @@ -371,11 +375,7 @@ # # Proc to be used when converting the value object # # @return [Proc] attr_reader :block - - cast_with(:string, :to_s) - cast_with(:integer, :to_i) - cast_with(:float, :to_f) end end