lib/peeky/predicates/attr_writer_predicate.rb
# Match will return true if the method_info seems to be an :attr_writer
#
# @param instance [Object] instance the object that has this method (required)
# @param method_info [String] method info (required)
Match will return true if the method_info seems to be an :attr_writer
Match will return true if the method_info seems to be an : attr_writer
def match(instance, method_info)
        return false unless prerequisites(instance, method_info)
        param = method_info.parameters.first
        param.type == :param_required && param.name.empty?
      end
def match ( instance , method_info ) return false unless prerequisites ( instance , method_info ) param = method_info . parameters . first param . type == :param_required && param . name . empty? end
Match will return true if the method_info seems to be an :attr_writer
Match will return true if the method_info seems to be an : attr_writer
# Taking advantage of an odd reflection concept in ruby where by # method.parameters returns this array value [:req] for :attr_writer # while ordinary methods return [:req, some_param_name]
instance
instance the object that has this method (required)
instance the object that has this method ( required )
method_info
method info (required)
method info ( required )