Class: 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 KMLObject

#comment, #id

Instance Method Summary collapse

Constructor Details

#initialize(duration = 0) ⇒ Wait

Returns a new instance of Wait.



1228
1229
1230
1231
# File 'lib/kamelopard/classes.rb', line 1228

def initialize(duration = 0)
    super()
    @duration = duration
end

Instance Attribute Details

#durationObject

Returns the value of attribute duration.



1227
1228
1229
# File 'lib/kamelopard/classes.rb', line 1227

def duration
  @duration
end

Instance Method Details

#to_kml(indent = 0) ⇒ Object



1233
1234
1235
1236
1237
# File 'lib/kamelopard/classes.rb', line 1233

def to_kml(indent = 0)
    super + <<-wait_kml
#{ ' ' * indent }<gx:Wait><gx:duration>#{@duration}</gx:duration></gx:Wait>
    wait_kml
end