Class: HealthVault::WCData::Dates::Approxdate
- Inherits:
-
ComplexType
- Object
- ComplexType
- HealthVault::WCData::Dates::Approxdate
- Defined in:
- lib/wc_data/generated/dates/approx_date.rb
Instance Attribute Summary
Attributes inherited from ComplexType
Instance Method Summary collapse
-
#d ⇒ Object
returns: a HealthVault::WCData::Dates::Day.
-
#d=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Day.
-
#initialize ⇒ Approxdate
constructor
A new instance of Approxdate.
-
#m ⇒ Object
returns: a HealthVault::WCData::Dates::Month.
-
#m=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Month.
-
#y ⇒ Object
returns: a HealthVault::WCData::Dates::Year.
-
#y=(value) ⇒ Object
REQUIRED value is a HealthVault::WCData::Dates::Year.
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 ⇒ Approxdate
Returns a new instance of Approxdate.
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/approx_date.rb', line 56 def initialize super self.tag_name = 'approx-date' @children['y'] = {:name => 'y', :class => HealthVault::WCData::Dates::Year, :value => nil, :min => 1, :max => 1, :order => 1, :place => :element, :choice => 0 } @children['y'][:value] = HealthVault::WCData::Dates::Year.new @children['m'] = {:name => 'm', :class => HealthVault::WCData::Dates::Month, :value => nil, :min => 0, :max => 1, :order => 2, :place => :element, :choice => 0 } @children['d'] = {:name => 'd', :class => HealthVault::WCData::Dates::Day, :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
#d ⇒ Object
returns: a HealthVault::WCData::Dates::Day
50 51 52 |
# File 'lib/wc_data/generated/dates/approx_date.rb', line 50 def d return @children['d'][:value] end |
#d=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Day
45 46 47 |
# File 'lib/wc_data/generated/dates/approx_date.rb', line 45 def d=(value) @children['d'][:value] = value end |
#m ⇒ Object
returns: a HealthVault::WCData::Dates::Month
37 38 39 |
# File 'lib/wc_data/generated/dates/approx_date.rb', line 37 def m return @children['m'][:value] end |
#m=(value) ⇒ Object
value is a HealthVault::WCData::Dates::Month
32 33 34 |
# File 'lib/wc_data/generated/dates/approx_date.rb', line 32 def m=(value) @children['m'][:value] = value end |
#y ⇒ Object
returns: a HealthVault::WCData::Dates::Year
24 25 26 |
# File 'lib/wc_data/generated/dates/approx_date.rb', line 24 def y return @children['y'][:value] end |
#y=(value) ⇒ Object
REQUIRED value is a HealthVault::WCData::Dates::Year
19 20 21 |
# File 'lib/wc_data/generated/dates/approx_date.rb', line 19 def y=(value) @children['y'][:value] = value end |