Class: HealthVault::WCData::Thing::Types::Displayvalue
- Inherits:
-
ComplexType
- Object
- ComplexType
- HealthVault::WCData::Thing::Types::Displayvalue
- Defined in:
- lib/wc_data/generated/thing/types/display_value.rb
Instance Attribute Summary
Attributes inherited from ComplexType
Instance Method Summary collapse
-
#data ⇒ Object
returns: a String.
-
#data=(value) ⇒ Object
REQUIRED value is a String.
-
#initialize ⇒ Displayvalue
constructor
A new instance of Displayvalue.
-
#units ⇒ Object
returns: a String.
-
#units=(value) ⇒ Object
remarks: For example, the base unit of measure for length is meters, this display value may contain a length in feet.
-
#units_code ⇒ Object
returns: a String.
-
#units_code=(value) ⇒ Object
remarks: If the unit of measure is available from one of the Microsoft Health Lexicon vocabularies, this attribute is the code in the lexicon for that unit.
Methods inherited from ComplexType
#add_new_to_children, #element, #method_missing, #optional_elements, #parse_element, #query_elements, #required_elements, #to_s, #valid?
Constructor Details
#initialize ⇒ Displayvalue
Returns a new instance of Displayvalue.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/wc_data/generated/thing/types/display_value.rb', line 61 def initialize super self.tag_name = 'display-value' @children['data'] = {:name => 'data', :class => String, :value => nil, :min => 1, :max => 1, :order => 0, :place => :extension, :choice => 0 } @children['data'][:value] = String.new @children['units'] = {:name => 'units', :class => String, :value => nil, :min => 1, :max => 1, :order => 0, :place => :attribute, :choice => 0 } @children['units'][:value] = String.new @children['units-code'] = {:name => 'units-code', :class => String, :value => nil, :min => 0, :max => 1, :order => 0, :place => :attribute, :choice => 0 } end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class HealthVault::WCData::ComplexType
Instance Method Details
#data ⇒ Object
returns: a String
25 26 27 |
# File 'lib/wc_data/generated/thing/types/display_value.rb', line 25 def data return @children['data'][:value] end |
#data=(value) ⇒ Object
REQUIRED value is a String
20 21 22 |
# File 'lib/wc_data/generated/thing/types/display_value.rb', line 20 def data=(value) @children['data'][:value] = value end |
#units ⇒ Object
returns: a String
40 41 42 |
# File 'lib/wc_data/generated/thing/types/display_value.rb', line 40 def units return @children['units'][:value] end |
#units=(value) ⇒ Object
remarks: For example, the base unit of measure for length is meters, this display value may contain a length in feet. The units attribute would contain “feet” or an appropriate abbreviation. value is a String
35 36 37 |
# File 'lib/wc_data/generated/thing/types/display_value.rb', line 35 def units=(value) @children['units'][:value] = value end |
#units_code ⇒ Object
returns: a String
55 56 57 |
# File 'lib/wc_data/generated/thing/types/display_value.rb', line 55 def units_code return @children['units-code'][:value] end |
#units_code=(value) ⇒ Object
remarks: If the unit of measure is available from one of the Microsoft Health Lexicon vocabularies, this attribute is the code in the lexicon for that unit. value is a String
50 51 52 |
# File 'lib/wc_data/generated/thing/types/display_value.rb', line 50 def units_code=(value) @children['units-code'][:value] = value end |