Ignore:
Timestamp:
Sep 18, 2009, 11:38:32 AM (11 years ago)
Author:
KOBAYASHI, Shinji
Message:

object_version_id test/unit move to rspec

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.5/lib/open_ehr/rm/support/identification.rb

    r277 r278  
    241241          attr_reader :object_id, :creating_system_id, :version_tree_id
    242242
    243           def initialize(value)
    244             super(value)
    245           end
    246 
    247           def value=(value)
    248             super(value)
    249             if /^(\w+)::(\w+)::((\d|\.)+)$/ =~ value
    250               self.object_id = UID.new($1)
    251               self.creating_system_id = UID.new($2)
    252               self.version_tree_id = VersionTreeID.new($3)
     243          def initialize(args= {})
     244            super(args)
     245          end
     246
     247          def value=(value)
     248            if /^(\S+)::(\S+)::((\d|\.)+)$/ =~ value
     249              self.object_id = UID.new(:value => $1)
     250              self.creating_system_id = UID.new(:value => $2)
     251              self.version_tree_id = VersionTreeID.new(:value => $3)
    253252            else
    254253              raise ArgumentError, 'invalid format'
Note: See TracChangeset for help on using the changeset viewer.