Ignore:
Timestamp:
Jul 4, 2009, 7:39:20 PM (15 years ago)
Author:
KOBAYASHI, Shinji
Message:

refs #62

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/lib/models/rm/common/generic.rb

    r155 r156  
    99      module Generic
    1010        class Audit_Details
     11          attr_reader :system_id, :committer, :time_committed, :change_type
     12          attr_accessor :description
     13
     14          def initialize(args = { })
     15            self.system_id = args[:system_id]
     16            self.committer = args[:committer]
     17            self.time_committed = args[:time_committed]
     18            self.change_type = args[:change_type]
     19            self.description = args[:description]
     20          end
     21
     22          def system_id=(system_id)
     23            if system_id.nil? or system_id.empty?
     24              raise ArgumentError, 'system_id is mandatory'
     25            end
     26            @system_id = system_id
     27          end
     28
     29          def committer=(committer)
     30            raise ArgumentError, 'committer is mandatory' if committer.nil?
     31            @committer = committer
     32          end
     33
     34          def time_committed=(time_committed)
     35            if time_committed.nil?
     36              raise ArgumentError, 'time_commited is mandatory'
     37            end
     38            @time_committed = time_committed
     39          end
     40
     41          def change_type=(change_type)
     42            raise ArgumentError, 'change_type is mandatory' if change_type.nil?
     43            @change_type = change_type
     44          end
    1145        end
     46
    1247        class Revision_History
    1348         
     
    75110          end
    76111        end
     112
     113        class Participation
     114          attr_reader :performer, :function, :mode
     115          attr_accessor :time
     116
     117          def initialize(args ={ })
     118            self.performer = args[:performer]
     119            self.function = args[:function]
     120            self.mode = args[:mode]
     121            self.time = args[:time]
     122          end
     123
     124          def performer=(performer)
     125            raise ArgumentError, 'performer is mandatory' if performer.nil?
     126            @performer = performer
     127          end
     128
     129          def function=(function)
     130            raise ArgumentError, 'function is mandatory' if function.nil?
     131            @function = function
     132          end
     133
     134          def mode=(mode)
     135            raise ArgumentError, 'mode is mandatory' if mode.nil?
     136            @mode = mode
     137          end
     138        end
    77139      end # of Generic
    78140    end # of Common
Note: See TracChangeset for help on using the changeset viewer.