Class: HealthVault::WCData::Thing::Inhaler::Alert

Inherits:
ComplexType
  • Object
show all
Defined in:
lib/wc_data/generated/thing/inhaler/alert.rb

Instance Attribute Summary

Attributes inherited from ComplexType

#tag_name

Instance Method Summary collapse

Methods inherited from ComplexType

#add_new_to_children, #element, #method_missing, #optional_elements, #parse_element, #query_elements, #required_elements, #to_s, #valid?

Constructor Details

#initializeAlert

Returns a new instance of Alert.



56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/wc_data/generated/thing/inhaler/alert.rb', line 56

def initialize
  super
  self.tag_name = 'alert'

  
  @children['dow'] = {:name => 'dow', :class => HealthVault::WCData::Thing::Inhaler::Dow, :value => Array.new, :min => 1, :max => 7, :order => 1, :place => :element, :choice => 0 }
  

  
  @children['time'] = {:name => 'time', :class => HealthVault::WCData::Dates::Time, :value => Array.new, :min => 1, :max => 999999, :order => 2, :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_dow(value) ⇒ Object

value is a HealthVault::WCData::Thing::Inhaler::Dow



19
20
21
# File 'lib/wc_data/generated/thing/inhaler/alert.rb', line 19

def add_dow(value)
  @children['dow'][:value] << value
end

#add_time(value) ⇒ Object

value is a HealthVault::WCData::Dates::Time



38
39
40
# File 'lib/wc_data/generated/thing/inhaler/alert.rb', line 38

def add_time(value)
  @children['time'][:value] << value
end

#dowObject

returns: a HealthVault::WCData::Thing::Inhaler::Dow Array



31
32
33
# File 'lib/wc_data/generated/thing/inhaler/alert.rb', line 31

def dow
  return @children['dow'][:value]
end

#remove_dow(value) ⇒ Object

value is a #HealthVault::WCData::Thing::Inhaler::Dow



24
25
26
# File 'lib/wc_data/generated/thing/inhaler/alert.rb', line 24

def remove_dow(value)
    @children['dow'][:value].delete(value)
end

#remove_time(value) ⇒ Object

value is a #HealthVault::WCData::Dates::Time



43
44
45
# File 'lib/wc_data/generated/thing/inhaler/alert.rb', line 43

def remove_time(value)
    @children['time'][:value].delete(value)
end

#timeObject

returns: a HealthVault::WCData::Dates::Time Array



50
51
52
# File 'lib/wc_data/generated/thing/inhaler/alert.rb', line 50

def time
  return @children['time'][:value]
end