Class: Sequent::Core::Commands

Inherits:
Object
  • Object
show all
Defined in:
lib/sequent/core/command.rb

Overview

Utility class containing all subclasses of BaseCommand.

Class Method Summary collapse

Class Method Details

.allObject



67
68
69
# File 'lib/sequent/core/command.rb', line 67

def all
  commands
end

.commandsObject



63
64
65
# File 'lib/sequent/core/command.rb', line 63

def commands
  Sequent::Core::BaseCommand.descendants
end

.find(command_name) ⇒ Object



71
72
73
# File 'lib/sequent/core/command.rb', line 71

def find(command_name)
  commands.find { |c| c.name == command_name }
end