Class: J1::Command

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

Class Method Summary collapse

Class Method Details

.inherited(base) ⇒ Object

Keep a list of subclasses of J1::Command every time it’s inherited Called automatically.

base - the subclass

Returns nothing



16
17
18
19
# File 'lib/j1/command.rb', line 16

def inherited(base)
  subclasses << base
  super(base)
end

.subclassesObject

A list of subclasses of J1::Command



6
7
8
# File 'lib/j1/command.rb', line 6

def subclasses
  @subclasses ||= []
end