Changeset 244


Ignore:
Timestamp:
Sep 3, 2009, 12:46:03 PM (11 years ago)
Author:
KOBAYASHI, Shinji
Message:

move DvInterval? test to rspec

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

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.5/lib/open_ehr/assumed_library_types.rb

    r216 r244  
    1212      attr_reader :lower, :upper
    1313     
    14       def initialize(lower, upper,
    15                      lower_included = nil, upper_included = nil)
    16         check_lower_upper(lower, upper)
    17         self.lower_included = lower_included
    18         self.upper_included = upper_included
     14      def initialize(args = {})
     15        check_lower_upper(args[:lower], args[:upper])
     16        self.lower_included = args[:lower_included]
     17        self.upper_included = args[:upper_included]
    1918      end
    2019
     
    7069
    7170      def check_lower_upper(lower, upper)
    72         if (lower == nil) && (upper == nil)
     71        if lower.nil? && upper.nil?
    7372          raise ArgumentError, "Either lower or upper must be assigned"
    7473        end
Note: See TracChangeset for help on using the changeset viewer.