Ignore:
Timestamp:
Aug 11, 2009, 11:19:02 PM (15 years ago)
Author:
KOBAYASHI, Shinji
Message:

refs #53

File:
1 edited

Legend:

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

    r167 r186  
    1717          attr_accessor :parent
    1818
    19           def initialize(parent = nil)
    20             @parent = parent
     19          def initialize(args = { })
     20            self.parent = args[:parent]
    2121          end
    2222
     
    4848
    4949          def initialize(args = { })
    50             super(args[:parent])
     50            super(args)
    5151            self.archetype_node_id = args[:archetype_node_id]
    5252            self.name = args[:name]
     
    5858         
    5959          def archetype_node_id=(archetype_node_id)
    60             raise ArgumentError, 'archetype_node_id should not be nil' if archetype_node_id.nil?
     60            if archetype_node_id.nil? or archetype_node_id.empty?
     61              raise ArgumentError, 'archetype_node_id should not be nil'
     62            end
    6163            @archetype_node_id = archetype_node_id
    6264          end
Note: See TracChangeset for help on using the changeset viewer.