Class: MML::ExtRef
- Inherits:
-
Object
- Object
- MML::ExtRef
- Defined in:
- lib/mml/common.rb
Instance Attribute Summary collapse
-
#contentType ⇒ Object
Returns the value of attribute contentType.
-
#href ⇒ Object
Returns the value of attribute href.
-
#medicalRole ⇒ Object
Returns the value of attribute medicalRole.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ ExtRef
constructor
A new instance of ExtRef.
- #to_xml ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ ExtRef
Returns a new instance of ExtRef.
97 98 99 100 101 102 |
# File 'lib/mml/common.rb', line 97 def initialize(args = {}) self.contentType = args[:contentType] self.medicalRole = args[:medicalRole] self.title = args[:title] self.href = args[:href] end |
Instance Attribute Details
#contentType ⇒ Object
Returns the value of attribute contentType.
94 95 96 |
# File 'lib/mml/common.rb', line 94 def contentType @contentType end |
#href ⇒ Object
Returns the value of attribute href.
95 96 97 |
# File 'lib/mml/common.rb', line 95 def href @href end |
#medicalRole ⇒ Object
Returns the value of attribute medicalRole.
94 95 96 |
# File 'lib/mml/common.rb', line 94 def medicalRole @medicalRole end |
#title ⇒ Object
Returns the value of attribute title.
94 95 96 |
# File 'lib/mml/common.rb', line 94 def title @title end |
Instance Method Details
#to_xml ⇒ Object
109 110 111 112 113 114 115 116 |
# File 'lib/mml/common.rb', line 109 def to_xml xb = Builder::XmlMarkup.new attributes = { 'mmlCm:href' => href } attributes['mmlCm:contentType'] = contentType if contentType attributes['mmlCm:medicalRole'] = medicalRole if medicalRole attributes['mmlCm:title'] = title if title xb.mmlCm :extRef, attributes end |