Class: SoundCue

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

Overview

Corresponds to a KML gx:SoundCue object

Instance Attribute Summary collapse

Attributes inherited from KMLObject

#comment, #id

Instance Method Summary collapse

Constructor Details

#initialize(href, delayedStart = nil) ⇒ SoundCue

Returns a new instance of SoundCue.



1243
1244
1245
1246
1247
# File 'lib/kamelopard/classes.rb', line 1243

def initialize(href, delayedStart = nil)
    super()
    @href = href
    @delayedStart = delayedStart
end

Instance Attribute Details

#delayedStartObject

Returns the value of attribute delayedStart.



1242
1243
1244
# File 'lib/kamelopard/classes.rb', line 1242

def delayedStart
  @delayedStart
end

#hrefObject

Returns the value of attribute href.



1242
1243
1244
# File 'lib/kamelopard/classes.rb', line 1242

def href
  @href
end

Instance Method Details

#to_kml(indent = 0) ⇒ Object



1249
1250
1251
1252
1253
1254
# File 'lib/kamelopard/classes.rb', line 1249

def to_kml(indent = 0)
    k = "#{ ' ' * indent }<gx:SoundCue id=\"#{ @id }\">\n"
    k << "#{ ' ' * indent }    <href>#{ @href }</href>\n"
    k << "#{ ' ' * indent }    <gx:delayedStart>#{ @delayedStart }</gx:delayedStart>\n" unless @delayedStart.nil?
    k << "#{ ' ' * indent}</gx:SoundCue>\n"
end