Class: HealthVault::WCData::Thing::Types::Language

Inherits:
ComplexType
  • Object
show all
Defined in:
lib/wc_data/generated/thing/types/language.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

#initializeLanguage

Returns a new instance of Language.



49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/wc_data/generated/thing/types/language.rb', line 49

def initialize
  super
  self.tag_name = 'language'

  
  @children['language'] = {:name => 'language', :class => HealthVault::WCData::Thing::Types::Codablevalue, :value => nil, :min => 0, :max => 1, :order => 1, :place => :element, :choice => 0 }
    
  

  
  @children['is-primary'] = {:name => 'is-primary', :class => String, :value => nil, :min => 0, :max => 1, :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

#is_primaryObject

returns: a String



43
44
45
# File 'lib/wc_data/generated/thing/types/language.rb', line 43

def is_primary
  return @children['is-primary'][:value]
end

#is_primary=(value) ⇒ Object

remarks: If true, the language is the preferred spoken language of the person. value is a String



38
39
40
# File 'lib/wc_data/generated/thing/types/language.rb', line 38

def is_primary=(value)
  @children['is-primary'][:value] = value
end

#languageObject

returns: a HealthVault::WCData::Thing::Types::Codablevalue



28
29
30
# File 'lib/wc_data/generated/thing/types/language.rb', line 28

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

#language=(value) ⇒ Object

remarks: The Microsoft Health Lexicon defines codes for many of the common spoken languages. In most cases the language should be specified by using the code retrieved from the Microsoft Health Lexicon by calling GetVocabulary with “languages” as the vocabulary name. If the language doesn’t exist the Microsoft Health Lexicon the “text” element of the codable value can be used to specify the language. preferred-vocabulary: iso:iso639-1 value is a HealthVault::WCData::Thing::Types::Codablevalue



23
24
25
# File 'lib/wc_data/generated/thing/types/language.rb', line 23

def language=(value)
  @children['language'][:value] = value
end