Browse Subversion Repository
Annotation of /action.rb
Parent Directory
| Revision Log
Revision 13 -
( hide annotations)
( download)
Fri Apr 6 13:54:21 2007 UTC
(16 years, 11 months ago)
by bluedwarf
File size: 1351 byte(s)
Improvement of documentations.
| 1 |
bluedwarf |
12 |
# action.rb: the class definition of Edmaru::Action |
| 2 |
bluedwarf |
10 |
# |
| 3 |
|
|
# Copyright (C) 2007 Takashi Nakamoto |
| 4 |
|
|
# |
| 5 |
|
|
# This program is free software; you can redistribute it and/or modify |
| 6 |
|
|
# it under the terms of the GNU General Public License version 2 as |
| 7 |
|
|
# published by the Free Software Foundation. |
| 8 |
|
|
# |
| 9 |
|
|
# This program is distributed in the hope that it will be useful, but |
| 10 |
|
|
# WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 |
|
|
# General Public License for more details. |
| 13 |
|
|
# |
| 14 |
|
|
# You should have received a copy of the GNU General Public License |
| 15 |
|
|
# along with this program; if not, write to the Free Software |
| 16 |
|
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 17 |
|
|
# 02110-1301 USA. |
| 18 |
|
|
# |
| 19 |
bluedwarf |
3 |
|
| 20 |
|
|
module Edmaru |
| 21 |
|
|
#The instance of this class represents one action. |
| 22 |
|
|
class Action |
| 23 |
|
|
|
| 24 |
|
|
#Constructs a new action with specified name and arguments. |
| 25 |
|
|
# |
| 26 |
|
|
#=== Arguments |
| 27 |
|
|
#_name_ :: Name of this action. |
| 28 |
bluedwarf |
13 |
#_arguments_ :: An instance of Array that contains arguments for |
| 29 |
bluedwarf |
3 |
#this action |
| 30 |
|
|
def initialize(name, arguments = nil) |
| 31 |
|
|
@name = name |
| 32 |
|
|
@arguments = arguments |
| 33 |
|
|
end |
| 34 |
|
|
|
| 35 |
|
|
def name=(new_name) |
| 36 |
|
|
@name = new_name |
| 37 |
|
|
end |
| 38 |
|
|
|
| 39 |
|
|
def name |
| 40 |
|
|
@name |
| 41 |
|
|
end |
| 42 |
|
|
|
| 43 |
|
|
def arguments=(new_arguments) |
| 44 |
|
|
@arguments = new_arguments |
| 45 |
|
|
end |
| 46 |
|
|
|
| 47 |
|
|
def arguments |
| 48 |
|
|
@arguments |
| 49 |
|
|
end |
| 50 |
|
|
end |
| 51 |
|
|
end |
|