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



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

def <<(command)
  commands << command
end

.allObject



60
61
62
# File 'lib/sequent/core/command.rb', line 60

def all
  commands
end

.commandsObject



56
57
58
# File 'lib/sequent/core/command.rb', line 56

def commands
  @commands ||= []
end

.find(command_name) ⇒ Object



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

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