Ignore:
Timestamp:
Sep 25, 2009, 12:15:59 PM (15 years ago)
Author:
KOBAYASHI, Shinji
Message:

hand merge

File:
1 edited

Legend:

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

    r167 r297  
    22# http://www.openehr.org/uml/release-1.0.1/Browsable/_9_0_76d0249_1109318114715_211173_0Report.html
    33# Ticket refs #65
    4 module OpenEhr
     4module OpenEHR
    55  module RM
    66    module Common
     
    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
    2323          def item_at_path(path)
    24             raise NotImplementError, "item_at_path must be implemented"
     24            raise NotImplementedError, "item_at_path must be implemented"
    2525          end
    2626
    2727          def items_at_path(path)
    28             raise NotImplementError, "items_at_path must be implemented"
     28            raise NotImplementedError, "items_at_path must be implemented"
    2929          end
    3030
    3131          def path_exists?(path)
    32             raise NotImplementError, "path_exists? must be implemented"
     32            raise NotImplementedError, "path_exists? must be implemented"
    3333          end
    3434
    3535          def path_of_item(item)
    36             raise NotImplementError, "path_of_item must be implemented"
     36            raise NotImplementedError, "path_of_item must be implemented"
    3737          end
    3838
    39           def path_unique(path)
    40             raise NotImplementError, "path_unique must be implemented"
     39          def path_unique?(path)
     40            raise NotImplementedError, "path_unique? must be implemented"
    4141          end
    4242        end
     
    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.