Class: CarbonMU::Command
- Inherits:
-
Object
show all
- Defined in:
- lib/carbonmu/command.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(context) ⇒ Command
Returns a new instance of Command.
28
29
30
31
|
# File 'lib/carbonmu/command.rb', line 28
def initialize(context)
@context = context
@params = context.params
end
|
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
26
27
28
|
# File 'lib/carbonmu/command.rb', line 26
def context
@context
end
|
Class Method Details
.command_classes ⇒ Object
21
22
23
|
# File 'lib/carbonmu/command.rb', line 21
def command_classes
@command_classes || []
end
|
.inherited(child) ⇒ Object
16
17
18
19
|
# File 'lib/carbonmu/command.rb', line 16
def inherited(child)
@command_classes ||= []
@command_classes << child
end
|
.syntax(value) ⇒ Object
7
8
9
10
|
# File 'lib/carbonmu/command.rb', line 7
def syntax(value)
@syntaxes ||= []
@syntaxes << value
end
|
.syntaxes ⇒ Object
12
13
14
|
# File 'lib/carbonmu/command.rb', line 12
def syntaxes
@syntaxes || []
end
|
Instance Method Details
#execute ⇒ Object
33
34
35
|
# File 'lib/carbonmu/command.rb', line 33
def execute
raise NotImplementedError
end
|