Class: Yarr::Command::RiClassMethod

Inherits:
RiCall show all
Defined in:
lib/yarr/command/ri.rb

Overview

Handles 'ri Array.size' like commands

Instance Attribute Summary

Attributes inherited from Base

#ast, #irc

Class Method Summary collapse

Methods inherited from Ri

#handle, #response

Methods included from Concern::ASTDigger

#digger

Methods included from Concern::Responder

#advice

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)

61
62
63
# File 'lib/yarr/command/ri.rb', line 61

def self.match?(ast)
  ast[:command] == 'ri' && ast.key?(:class_method)
end