# action.rb - action descriptors # # Copyright (C) 2002 Yoshinori K. Okuji # # This file is part of BugCommunicator. # # BugCommunicator is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # BugCommunicator is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with BugCommunicator; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA module BugCommunicator class Action def initialize(requester, project) @requester = requester @project = project end attr_reader :requester, :project end class AddProjectAction < Action def initialize(requester, project, admins, lists) @admins = admins @lists = lists super(requester, project) end attr_reader :admins, :lists end class RemoveProjectAction < Action def initialize(requester, project) super end end class ChangeAdminsAction < Action def initialize(requester, project, old_admins, new_admins) @old_admins = old_admins @new_admins = new_admins super(requester, project) end attr_reader :old_admins, :new_admins end class ChangeListsAction < Action def initialize(requester, project, old_lists, new_lists) @old_lists = old_lists @new_lists = new_lists super(requester, project) end attr_reader :old_lists, :new_lists end class ChangeFieldAction < Action def initialize(requester, project, old_field, new_field) @old_field = old_field @new_field = new_field super(requester, project) end attr_reader :old_field, :new_field end class AddFieldAction < Action def initialize(requester, project, field) @field = field super(requester, project) end attr_reader :field end class RemoveFieldAction < Action def initialize(requester, project, field) @field = field super(requester, project) end attr_reader :field end end