class Machete::Matchers::LiteralMatcher

Attributes

literal[R]

Public Class Methods

new(literal) click to toggle source
# File lib/machete/matchers.rb, line 123
def initialize(literal)
  @literal = literal
end

Public Instance Methods

==(other) click to toggle source
# File lib/machete/matchers.rb, line 127
def ==(other)
  other.instance_of?(self.class) && @literal == other.literal
end
matches?(node) click to toggle source
# File lib/machete/matchers.rb, line 131
def matches?(node)
  @literal == node
end