Class: SimpleXml::Range

Inherits:
Object
  • Object
show all
Includes:
Utilities
Defined in:
lib/model/types.rb

Overview

Represents a HQMF physical quantity which can have low and high bounds

Constant Summary

Constants included from Utilities

Utilities::MEASURE_ATTRIBUTES_MAP

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utilities

#attr_val, attr_val, build_value, #children_of, #comments_on, #create_age_timing, #create_birthdate_criteria

Constructor Details

#initialize(comparison, quantity, unit, type = nil) ⇒ Range

Returns a new instance of Range.



61
62
63
64
# File 'lib/model/types.rb', line 61

def initialize(comparison, quantity, unit, type=nil)
  @type = type
  set_optional_value(comparison, quantity, unit)
end

Instance Attribute Details

#highObject

Returns the value of attribute high.



59
60
61
# File 'lib/model/types.rb', line 59

def high
  @high
end

#lowObject

Returns the value of attribute low.



59
60
61
# File 'lib/model/types.rb', line 59

def low
  @low
end

#typeObject

Returns the value of attribute type.



59
60
61
# File 'lib/model/types.rb', line 59

def type
  @type
end

#widthObject

Returns the value of attribute width.



59
60
61
# File 'lib/model/types.rb', line 59

def width
  @width
end

Instance Method Details

#to_modelObject



66
67
68
69
70
# File 'lib/model/types.rb', line 66

def to_model
  lm = low ? low.to_model : nil
  hm = high ? high.to_model : nil
  HQMF::Range.new(type, lm, hm, nil)
end