Class: HealthVault::WCData::Thing::Types::Sampleset
- Inherits:
-
ComplexType
- Object
- ComplexType
- HealthVault::WCData::Thing::Types::Sampleset
- Defined in:
- lib/wc_data/generated/thing/types/sample_set.rb
Instance Attribute Summary
Attributes inherited from ComplexType
Instance Method Summary collapse
-
#add_sample(value) ⇒ Object
value is a HealthVault::WCData::Thing::Types::Sample.
-
#base_time ⇒ Object
returns: a HealthVault::WCData::Dates::Datetime.
-
#base_time=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Datetime.
-
#initialize ⇒ Sampleset
constructor
A new instance of Sampleset.
-
#remove_sample(value) ⇒ Object
value is a #HealthVault::WCData::Thing::Types::Sample.
-
#sample ⇒ Object
returns: a HealthVault::WCData::Thing::Types::Sample Array.
-
#sample_unit ⇒ Object
returns: a String.
-
#sample_unit=(value) ⇒ Object
remarks: Each sample contains a value.
-
#sample_unit_code ⇒ Object
returns: a HealthVault::WCData::Thing::Types::Codablevalue.
-
#sample_unit_code=(value) ⇒ Object
remarks: Each sample contains a value.
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 ⇒ Sampleset
Returns a new instance of Sampleset.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/wc_data/generated/thing/types/sample_set.rb', line 81 def initialize super self.tag_name = 'sample-set' @children['base-time'] = {:name => 'base-time', :class => HealthVault::WCData::Dates::Datetime, :value => nil, :min => 1, :max => 1, :order => 1, :place => :element, :choice => 0 } @children['base-time'][:value] = HealthVault::WCData::Dates::Datetime.new @children['sample-unit'] = {:name => 'sample-unit', :class => String, :value => nil, :min => 1, :max => 1, :order => 2, :place => :element, :choice => 0 } @children['sample-unit'][:value] = String.new @children['sample-unit-code'] = {:name => 'sample-unit-code', :class => HealthVault::WCData::Thing::Types::Codablevalue, :value => nil, :min => 1, :max => 1, :order => 3, :place => :element, :choice => 0 } @children['sample-unit-code'][:value] = HealthVault::WCData::Thing::Types::Codablevalue.new @children['sample'] = {:name => 'sample', :class => HealthVault::WCData::Thing::Types::Sample, :value => Array.new, :min => 0, :max => 999999, :order => 4, :place => :element, :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
#add_sample(value) ⇒ Object
value is a HealthVault::WCData::Thing::Types::Sample
63 64 65 |
# File 'lib/wc_data/generated/thing/types/sample_set.rb', line 63 def add_sample(value) @children['sample'][:value] << value end |
#base_time ⇒ Object
returns: a HealthVault::WCData::Dates::Datetime
26 27 28 |
# File 'lib/wc_data/generated/thing/types/sample_set.rb', line 26 def base_time return @children['base-time'][:value] end |
#base_time=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Datetime
21 22 23 |
# File 'lib/wc_data/generated/thing/types/sample_set.rb', line 21 def base_time=(value) @children['base-time'][:value] = value end |
#remove_sample(value) ⇒ Object
value is a #HealthVault::WCData::Thing::Types::Sample
68 69 70 |
# File 'lib/wc_data/generated/thing/types/sample_set.rb', line 68 def remove_sample(value) @children['sample'][:value].delete(value) end |
#sample ⇒ Object
returns: a HealthVault::WCData::Thing::Types::Sample Array
75 76 77 |
# File 'lib/wc_data/generated/thing/types/sample_set.rb', line 75 def sample return @children['sample'][:value] end |
#sample_unit ⇒ Object
returns: a String
41 42 43 |
# File 'lib/wc_data/generated/thing/types/sample_set.rb', line 41 def sample_unit return @children['sample-unit'][:value] end |
#sample_unit=(value) ⇒ Object
remarks: Each sample contains a value. All samples in a sample set should be stored using the same units. This value is a text description of the units the sample value is stored in. Use the “sample-unit-code” to describe the units as a dictionary code. value is a String
36 37 38 |
# File 'lib/wc_data/generated/thing/types/sample_set.rb', line 36 def sample_unit=(value) @children['sample-unit'][:value] = value end |
#sample_unit_code ⇒ Object
returns: a HealthVault::WCData::Thing::Types::Codablevalue
56 57 58 |
# File 'lib/wc_data/generated/thing/types/sample_set.rb', line 56 def sample_unit_code return @children['sample-unit-code'][:value] end |
#sample_unit_code=(value) ⇒ Object
remarks: Each sample contains a value. All samples in a sample set should be stored using the same units. value is a HealthVault::WCData::Thing::Types::Codablevalue
51 52 53 |
# File 'lib/wc_data/generated/thing/types/sample_set.rb', line 51 def sample_unit_code=(value) @children['sample-unit-code'][:value] = value end |