lib/cinnamon_serial/resolver.rb in cinnamon_serial-1.0.1 vs lib/cinnamon_serial/resolver.rb in cinnamon_serial-2.0.0

- old
+ new

@@ -10,12 +10,10 @@ module CinnamonSerial # Class that allows an engineer to specify what to do about mapping a key for a serializer. class Resolver attr_accessor :as, :blank, - # <b>DEPRECATED:</b> Please use <tt>false_alias</tt> instead. - :false, :false_alias, :for, :manual, :mask, :mask_char, @@ -24,12 +22,10 @@ :null, :percent, :present, :through, :transform, - # <b>DEPRECATED:</b> Please use <tt>true_alias</tt> instead. - :true, :true_alias def initialize(options = {}) @option_keys = options.keys.map(&:to_s).to_set @@ -89,17 +85,11 @@ end def resolve_alias(value) if @option_keys.include?('true_alias') && value.is_a?(TrueClass) true_alias - # <b>DEPRECATED:</b> Please use <tt>true_alias</tt> instead. - elsif @option_keys.include?('true') && value.is_a?(TrueClass) - self.true elsif @option_keys.include?('false_alias') && value.is_a?(FalseClass) false_alias - # <b>DEPRECATED:</b> Please use <tt>false_alias</tt> instead. - elsif @option_keys.include?('false') && value.is_a?(FalseClass) - self.false elsif @option_keys.include?('null') && value.nil? null elsif @option_keys.include?('blank') && Formatting.blank?(value) blank elsif @option_keys.include?('present') && Formatting.present?(value)