Class: Alias

Inherits:
Object
  • Object
show all
Defined in:
lib/kamelopard/classes.rb

Overview

Sub-object in the KML ResourceMap class

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#sourceHrefObject

Returns the value of attribute sourceHref.



1609
1610
1611
# File 'lib/kamelopard/classes.rb', line 1609

def sourceHref
  @sourceHref
end

#targetHrefObject

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