Changeset 117 for ruby/trunk/lib/models/rm/common/change_control.rb
- Timestamp:
- Apr 5, 2009, 7:22:49 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/trunk/lib/models/rm/common/change_control.rb
r115 r117 21 21 end 22 22 def versions=(versions) 23 unless uid.nil?24 if uid.empty?23 unless versions.nil? 24 if versions.empty? 25 25 raise ArgumentError, 'versions shoud not be nil or empty.' 26 26 end … … 40 40 class Versioned_Object 41 41 end 42 42 43 class Version 44 attr_reader :uid, :contribution, :commit_audit, :signature 45 attr_reader :attestations, :data 46 def initialize(uid, contribution, commit_audit, signature=nil, attestations=nil, data=nil) 47 self.uid = uid 48 self.contribution = contribution 49 self.commit_audit = commit_audit 50 end 51 def uid=(uid) 52 raise ArgumentError, "uid should not be nil" if uid.nil? 53 end 54 def contribution=(contribution) 55 raise ArgumentError, "contribution should not be nil" if contribution.nil? or contribution.type == '' 56 @contribution = contribution 57 end 58 def commit_audit=(commit_audit) 59 raise ArgumentError, "commit_audit should not be nil" if commit_audit.nil? 60 @commit_audit = commit_audit 61 end 43 62 end 63 44 64 class Imported_Version < Version 45 65 end 66 46 67 class Original_Version < Version 47 68 end
Note:
See TracChangeset
for help on using the changeset viewer.