Class: Fast::MethodCall

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

Overview

Find using custom methods

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(method_name) ⇒ MethodCall

Returns a new instance of MethodCall.



526
527
528
# File 'lib/fast.rb', line 526

def initialize(method_name)
  @method_name = method_name
end

Instance Method Details

#match?(node) ⇒ Boolean

Returns:

  • (Boolean)


530
531
532
# File 'lib/fast.rb', line 530

def match?(node)
  Kernel.send(@method_name, node)
end