def match?(args)
      select_defined(args).reduce(true) do |sum, attribute|
        sum = sum && (send(attribute[0]) == attribute[1])
      end 
    end
def match?(args)
      select_defined(args).reduce(true) do |sum, attribute|
        sum = sum && (send(attribute[0]) == attribute[1])
      end 
    end
Checks whether the link matches the values provided by args and returns
 true if so otherwise false
   link.match?(name: "Example", tag: "Test")