Class: Kamelopard::Wait

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

Overview

Corresponds to a KML gx:Wait 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?

Constructor Details

#initialize(duration = 0, options = {}) ⇒ Wait

Returns a new instance of Wait.



1733
1734
1735
1736
# File 'lib/kamelopard/classes.rb', line 1733

def initialize(duration = 0, options = {})
    super options
    @duration = duration
end

Instance Attribute Details

#durationObject

Returns the value of attribute duration.



1732
1733
1734
# File 'lib/kamelopard/classes.rb', line 1732

def duration
  @duration
end

Instance Method Details

#to_kml(elem = nil) ⇒ Object



1738
1739
1740
1741
1742
1743
1744
1745
1746
# File 'lib/kamelopard/classes.rb', line 1738

def to_kml(elem = nil)
    k = XML::Node.new 'gx:Wait'
    super k
    d = XML::Node.new 'gx:duration'
    d << @duration.to_s
    k << d
    elem << k unless elem.nil?
    k
end