Class: Kamelopard::Alias
- Inherits:
-
Object
- Object
- Kamelopard::Alias
- Defined in:
- lib/kamelopard/classes.rb
Overview
Sub-object in the KML ResourceMap class
Instance Attribute Summary collapse
-
#sourceHref ⇒ Object
Returns the value of attribute sourceHref.
-
#targetHref ⇒ Object
Returns the value of attribute targetHref.
Instance Method Summary collapse
-
#initialize(targetHref = nil, sourceHref = nil) ⇒ Alias
constructor
A new instance of Alias.
- #to_kml(elem = nil) ⇒ Object
Constructor Details
#initialize(targetHref = nil, sourceHref = nil) ⇒ Alias
Returns a new instance of Alias.
2151 2152 2153 2154 |
# File 'lib/kamelopard/classes.rb', line 2151 def initialize(targetHref = nil, sourceHref = nil) @targetHref = targetHref @sourceHref = sourceHref end |
Instance Attribute Details
#sourceHref ⇒ Object
Returns the value of attribute sourceHref.
2150 2151 2152 |
# File 'lib/kamelopard/classes.rb', line 2150 def sourceHref @sourceHref end |
#targetHref ⇒ Object
Returns the value of attribute targetHref.
2150 2151 2152 |
# File 'lib/kamelopard/classes.rb', line 2150 def targetHref @targetHref end |
Instance Method Details
#to_kml(elem = nil) ⇒ Object
2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 |
# File 'lib/kamelopard/classes.rb', line 2156 def to_kml(elem = nil) x = XML::Node.new 'Alias' { :targetHref => @targetHref, :sourceHref => @sourceHref, }.each do |k, v| d = XML::Node.new k.to_s d << v.to_s x << d end elem << x unless elem.nil? x end |