Class: Kamelopard::Data
- Inherits:
-
Object
- Object
- Kamelopard::Data
- Defined in:
- lib/kamelopard/classes.rb
Overview
Corresponds to Data elements within ExtendedData
Instance Attribute Summary collapse
-
#displayName ⇒ Object
Returns the value of attribute displayName.
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(name, value, displayName = nil) ⇒ Data
constructor
A new instance of Data.
- #to_kml(elem = nil) ⇒ Object
Constructor Details
#initialize(name, value, displayName = nil) ⇒ Data
Returns a new instance of Data.
835 836 837 838 839 |
# File 'lib/kamelopard/classes.rb', line 835 def initialize(name, value, displayName = nil) @name = name @displayName = displayName @value = value end |
Instance Attribute Details
#displayName ⇒ Object
Returns the value of attribute displayName.
834 835 836 |
# File 'lib/kamelopard/classes.rb', line 834 def displayName @displayName end |
#name ⇒ Object
Returns the value of attribute name.
834 835 836 |
# File 'lib/kamelopard/classes.rb', line 834 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
834 835 836 |
# File 'lib/kamelopard/classes.rb', line 834 def value @value end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
841 842 843 844 845 846 847 848 849 850 |
# File 'lib/kamelopard/classes.rb', line 841 def to_kml(elem = nil) v = XML::Node.new 'Data' v.attributes['name'] = @name Kamelopard.kml_array(v, [ [@value, 'value'], [@displayName, 'displayName'] ]) elem << v unless elem.nil? v end |