Ignore:
Timestamp:
Sep 27, 2008, 1:12:51 PM (16 years ago)
Author:
KOBAYASHI, Shinji
Message:

refs #48, #52, #39

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/trunk/lib/models/rm/data_types/text.rb

    r90 r106  
    4747          attr_reader :terminology_id, :code_string
    4848          def initialize(terminology_id, code_string)
    49             if terminlogyID.nil?
    50               raise Exception.new("nil terminology")
    51             end
    52             if code_string.nil?
    53               raise Exception.new("empty codeString")
    54             end
    55             if terminology_id.instance_of?(Terminology_ID)
    56               @terminology_id = terminology_id
    57             else
    58               @terminologyID = Terminology_ID.new(terminology_id)
    59             end
     49            self.terminology_id = terminology_id
     50            self.code_string = code_string
     51          end
     52
     53          def terminology_id=(terminology_id)
     54            raise ArgumentError, "terminology_id should not be nil" if terminology_id.nil?
     55            @terminology_id = terminology_id
     56          end
     57
     58          def code_string=(code_string)
     59            raise ArgumentError, "code_string should not be empty" if code_string.nil? or code_string.empty?
    6060            @code_string = code_string
    61           end
     61          end 
    6262        end # of Code_Phrase
    6363
Note: See TracChangeset for help on using the changeset viewer.