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

.<<(command) ⇒ Object



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

def <<(command)
  commands << command
end

.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
  @commands ||= []
end

.find(command_name) ⇒ Object



75
76
77
# File 'lib/sequent/core/command.rb', line 75

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