Browse Subversion Repository
Contents of /action.rb
Parent Directory
| Revision Log
Revision 3 -
( show annotations)
( download)
Tue Apr 3 20:38:37 2007 UTC
(16 years, 11 months ago)
by bluedwarf
File size: 612 byte(s)
* Separated Action class from action_manager.rb.
* Added exit action.
| 1 |
|
| 2 |
module Edmaru |
| 3 |
#The instance of this class represents one action. |
| 4 |
class Action |
| 5 |
|
| 6 |
#Constructs a new action with specified name and arguments. |
| 7 |
# |
| 8 |
#=== Arguments |
| 9 |
#_name_ :: Name of this action. |
| 10 |
#_arguments :: An instance of Array that contains arguments for |
| 11 |
#this action |
| 12 |
def initialize(name, arguments = nil) |
| 13 |
@name = name |
| 14 |
@arguments = arguments |
| 15 |
end |
| 16 |
|
| 17 |
def name=(new_name) |
| 18 |
@name = new_name |
| 19 |
end |
| 20 |
|
| 21 |
def name |
| 22 |
@name |
| 23 |
end |
| 24 |
|
| 25 |
def arguments=(new_arguments) |
| 26 |
@arguments = new_arguments |
| 27 |
end |
| 28 |
|
| 29 |
def arguments |
| 30 |
@arguments |
| 31 |
end |
| 32 |
end |
| 33 |
end |
|