Class: Fast::InstanceMethodCall

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

Overview

Search using custom instance 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) ⇒ InstanceMethodCall

Returns a new instance of InstanceMethodCall.



537
538
539
# File 'lib/fast.rb', line 537

def initialize(method_name)
  @method_name = method_name
end

Instance Method Details

#match?(node) ⇒ Boolean

Returns:

  • (Boolean)


541
542
543
# File 'lib/fast.rb', line 541

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