Class: Kamelopard::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 TourPrimitive

#standalone

Attributes inherited from Object

#comment, #kml_id, #master_only

Instance Method Summary collapse

Methods inherited from Object

#_alternate_to_kml, #change, #master_only?, parse

Constructor Details

#initialize(href, delayedStart = nil) ⇒ SoundCue

Returns a new instance of SoundCue.



1970
1971
1972
1973
1974
# File 'lib/kamelopard/classes.rb', line 1970

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

Instance Attribute Details

#delayedStartObject

Returns the value of attribute delayedStart.



1969
1970
1971
# File 'lib/kamelopard/classes.rb', line 1969

def delayedStart
  @delayedStart
end

#hrefObject

Returns the value of attribute href.



1969
1970
1971
# File 'lib/kamelopard/classes.rb', line 1969

def href
  @href
end

Instance Method Details

#to_kml(elem = nil) ⇒ Object



1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
# File 'lib/kamelopard/classes.rb', line 1976

def to_kml(elem = nil)
    k = XML::Node.new 'gx:SoundCue'
    super k
    d = XML::Node.new 'href'
    d << @href.to_s
    k << d
    if not @delayedStart.nil? then
        d = XML::Node.new 'gx:delayedStart'
        d << @delayedStart.to_s
        k << d
    end
    elem << k unless elem.nil?
    k
end