Changeset 331 for ruby


Ignore:
Timestamp:
Nov 5, 2009, 9:42:53 PM (14 years ago)
Author:
KOBAYASHI, Shinji
Message:

change_control package is complexed

Location:
ruby/branches/0.5
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.5/lib/open_ehr/rm/common/change_control.rb

    r216 r331  
    8888
    8989          def contribution=(contribution)
    90             raise ArgumentError, "contribution should not be nil" if contribution.nil? or contribution.type.empty?
    91             @contribution = contribution
     90            if contribution.nil? or contribution.type.empty?
     91              raise ArgumentError, "contribution is invalid"
     92            end
     93            if contribution.type == 'CONTRIBUTION'
     94              @contribution = contribution
     95            else
     96              raise ArgumentError, 'contribution is invalid'
     97            end
    9298          end
    9399
    94100          def owner_id
    95             return HierObjectId.new(@uid.object_id.value)
     101            return HierObjectID.new(:value => @uid.value)
    96102          end
    97103
     
    101107
    102108          def canonical_form
    103             raise NotImplementedError, 'canonical form not implemented'
     109            raise NotImplementedError, 'canonical form is not determined'
    104110          end
    105111        end
Note: See TracChangeset for help on using the changeset viewer.