Class: Alias
- Inherits:
-
Object
- Object
- 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(indent = 0) ⇒ Object
Constructor Details
#initialize(targetHref = nil, sourceHref = nil) ⇒ Alias
Returns a new instance of Alias.
1610 1611 1612 1613 |
# File 'lib/kamelopard/classes.rb', line 1610 def initialize(targetHref = nil, sourceHref = nil) @targetHref = targetHref @sourceHref = sourceHref end |
Instance Attribute Details
#sourceHref ⇒ Object
Returns the value of attribute sourceHref.
1609 1610 1611 |
# File 'lib/kamelopard/classes.rb', line 1609 def sourceHref @sourceHref end |
#targetHref ⇒ Object
Returns the value of attribute targetHref.
1609 1610 1611 |
# File 'lib/kamelopard/classes.rb', line 1609 def targetHref @targetHref end |
Instance Method Details
#to_kml(indent = 0) ⇒ Object
1615 1616 1617 1618 1619 1620 1621 |
# File 'lib/kamelopard/classes.rb', line 1615 def to_kml(indent = 0) k = "#{ ' ' * indent }<Alias>\n" k << "#{ ' ' * indent } <targetHref>#{ @targetHref }</targetHref>\n" k << "#{ ' ' * indent } <sourceHref>#{ @sourceHref }</sourceHref>\n" k << "#{ ' ' * indent }</Alias>\n" k end |