Class: Fast::FindString

Inherits:
Find
  • Object
show all
Defined in:
lib/fast.rb

Overview

Find literal strings using double quotes

Instance Attribute Summary

Attributes inherited from Find

#token

Instance Method Summary collapse

Methods inherited from Find

#==, #compare_symbol_or_head, #debug, #debug_match_recursive, #match_recursive, #to_s

Constructor Details

#initialize(token) ⇒ FindString

Returns a new instance of FindString.



515
516
517
# File 'lib/fast.rb', line 515

def initialize(token)
  @token = token
end

Instance Method Details

#match?(node) ⇒ Boolean

Returns:

  • (Boolean)


519
520
521
# File 'lib/fast.rb', line 519

def match?(node)
  node == token
end