123456789_123456789_123456789_123456789_123456789_

Class: YARD::Handlers::Ruby::MethodCallWrapper

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: YARD::Handlers::Ruby::HandlesExtension
Defined in: lib/yard/handlers/ruby/base.rb

Class Method Summary

HandlesExtension - Inherited

.new

Creates a new extension with a specific matcher value name

Instance Method Summary

HandlesExtension - Inherited

#matches?

Tests if the node matches the handler.

Constructor Details

This class inherits a constructor from YARD::Handlers::Ruby::HandlesExtension

Instance Method Details

#matches?(node) ⇒ Boolean

[ GitHub ]

  
# File 'lib/yard/handlers/ruby/base.rb', line 38

def matches?(node)
  case node.type
  when :var_ref
    if !node.parent || node.parent.type == :list
      return true if node[0].type == :ident && (name.nil? || node[0][0] == name)
    end
  when :fcall, :command, :vcall
    return true if name.nil? || node[0][0] == name
  when :call, :command_call
    return true if name.nil? || node[2][0] == name
  end
  false
end