Class: CommandArray
- Inherits:
-
Array
- Object
- Array
- CommandArray
show all
- Defined in:
- lib/commandarray.rb
Instance Method Summary
collapse
Instance Method Details
#add(command) ⇒ Object
8
9
10
|
# File 'lib/commandarray.rb', line 8
def add command
self << command if(!include?(command))
end
|
#execute ⇒ Object
12
13
14
15
16
17
18
19
|
# File 'lib/commandarray.rb', line 12
def execute
i=0
while i < self.length
self[i]=Command.new(self[i]) if(self[i].is_a?(String))
self[i].execute
i=i+1
end
end
|
#update ⇒ Object
5
6
|
# File 'lib/commandarray.rb', line 5
def update
end
|