Module: Leftovers::MatcherBuilders::NodeHasKeywordArgument
- Defined in:
- lib/leftovers/matcher_builders/node_has_keyword_argument.rb
Class Method Summary collapse
Class Method Details
.build(keywords, value_matcher) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/leftovers/matcher_builders/node_has_keyword_argument.rb', line 7 def build(keywords, value_matcher) value_matcher = NodePairValue.build(value_matcher) keyword_matcher = build_keyword_matcher(keywords) pair_matcher = And.build([keyword_matcher, value_matcher]) return unless pair_matcher Matchers::NodeHasAnyKeywordArgument.new(pair_matcher) end |