class Leftovers::Matchers::NodeHasAnyKeywordArgument
Public Class Methods
new(pair_matcher)
click to toggle source
:nocov:
# File lib/leftovers/matchers/node_has_any_keyword_argument.rb, line 10 def initialize(pair_matcher) @pair_matcher = pair_matcher freeze end
Public Instance Methods
===(node)
click to toggle source
# File lib/leftovers/matchers/node_has_any_keyword_argument.rb, line 16 def ===(node) kwargs = node.kwargs return false unless kwargs kwargs.children.any? do |pair| @pair_matcher === pair end end