class Leftovers::Matchers::NodeHasPositionalArgumentWithValue
Public Class Methods
new(position, matcher)
click to toggle source
:nocov:
# File lib/leftovers/matchers/node_has_positional_argument_with_value.rb, line 10 def initialize(position, matcher) @position = position @matcher = matcher freeze end
Public Instance Methods
===(node)
click to toggle source
# File lib/leftovers/matchers/node_has_positional_argument_with_value.rb, line 17 def ===(node) value_node = node.positional_arguments[@position] @matcher === value_node if value_node end