Class: HealthVault::WCData::Dates::Datetime
- Inherits:
-
ComplexType
- Object
- ComplexType
- HealthVault::WCData::Dates::Datetime
- Defined in:
- lib/wc_data/generated/dates/date_time.rb
Instance Attribute Summary
Attributes inherited from ComplexType
Instance Method Summary collapse
-
#date ⇒ Object
returns: a HealthVault::WCData::Dates::Date.
-
#date=(value) ⇒ Object
REQUIRED value is a HealthVault::WCData::Dates::Date.
-
#initialize ⇒ Datetime
constructor
A new instance of Datetime.
-
#time ⇒ Object
returns: a HealthVault::WCData::Dates::Time.
-
#time=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Time.
-
#tz ⇒ Object
returns: a HealthVault::WCData::Types::Codablevalue.
-
#tz=(value) ⇒ Object
value is a HealthVault::WCData::Types::Codablevalue.
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 ⇒ Datetime
Returns a new instance of Datetime.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/wc_data/generated/dates/date_time.rb', line 56 def initialize super self.tag_name = 'date-time' @children['date'] = {:name => 'date', :class => HealthVault::WCData::Dates::Date, :value => nil, :min => 1, :max => 1, :order => 1, :place => :element, :choice => 0 } @children['date'][:value] = HealthVault::WCData::Dates::Date.new @children['time'] = {:name => 'time', :class => HealthVault::WCData::Dates::Time, :value => nil, :min => 0, :max => 1, :order => 2, :place => :element, :choice => 0 } @children['tz'] = {:name => 'tz', :class => HealthVault::WCData::Types::Codablevalue, :value => nil, :min => 0, :max => 1, :order => 3, :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
#date ⇒ Object
returns: a HealthVault::WCData::Dates::Date
24 25 26 |
# File 'lib/wc_data/generated/dates/date_time.rb', line 24 def date return @children['date'][:value] end |
#date=(value) ⇒ Object
REQUIRED value is a HealthVault::WCData::Dates::Date
19 20 21 |
# File 'lib/wc_data/generated/dates/date_time.rb', line 19 def date=(value) @children['date'][:value] = value end |
#time ⇒ Object
returns: a HealthVault::WCData::Dates::Time
37 38 39 |
# File 'lib/wc_data/generated/dates/date_time.rb', line 37 def time return @children['time'][:value] end |
#time=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Time
32 33 34 |
# File 'lib/wc_data/generated/dates/date_time.rb', line 32 def time=(value) @children['time'][:value] = value end |
#tz ⇒ Object
returns: a HealthVault::WCData::Types::Codablevalue
50 51 52 |
# File 'lib/wc_data/generated/dates/date_time.rb', line 50 def tz return @children['tz'][:value] end |
#tz=(value) ⇒ Object
value is a HealthVault::WCData::Types::Codablevalue
45 46 47 |
# File 'lib/wc_data/generated/dates/date_time.rb', line 45 def tz=(value) @children['tz'][:value] = value end |