Class: Yarr::Command::RiMethodName

Inherits:
Ri
  • Object
show all
Defined in:
lib/yarr/command/ri.rb

Overview

Handles 'ri size' like commands

Instance Attribute Summary

Attributes inherited from Base

#ast

Class Method Summary collapse

Methods inherited from Ri

#handle, #response

Methods included from Concern::ASTDigger

#digger

Methods inherited from Base

#handle, #initialize

Constructor Details

This class inherits a constructor from Yarr::Command::Base

Class Method Details

.match?(ast) ⇒ Boolean

Can we handle the given AST?

Parameters:

  • ast (hash)

    parsed AST

Returns:

  • (Boolean)

75
76
77
# File 'lib/yarr/command/ri.rb', line 75

def self.match?(ast)
  super && ast.key?(:method_name)
end