Class: Region
Overview
Corresponds to the KML Region object
Instance Attribute Summary collapse
-
#latlonaltbox ⇒ Object
Returns the value of attribute latlonaltbox.
-
#lod ⇒ Object
Returns the value of attribute lod.
Attributes inherited from KMLObject
Instance Method Summary collapse
-
#initialize(latlonaltbox, lod) ⇒ Region
constructor
A new instance of Region.
- #to_kml(indent = 0) ⇒ Object
Constructor Details
#initialize(latlonaltbox, lod) ⇒ Region
Returns a new instance of Region.
1549 1550 1551 1552 1553 |
# File 'lib/kamelopard/classes.rb', line 1549 def initialize(latlonaltbox, lod) super() @latlonaltbox = latlonaltbox @lod = lod end |
Instance Attribute Details
#latlonaltbox ⇒ Object
Returns the value of attribute latlonaltbox.
1547 1548 1549 |
# File 'lib/kamelopard/classes.rb', line 1547 def latlonaltbox @latlonaltbox end |
#lod ⇒ Object
Returns the value of attribute lod.
1547 1548 1549 |
# File 'lib/kamelopard/classes.rb', line 1547 def lod @lod end |
Instance Method Details
#to_kml(indent = 0) ⇒ Object
1555 1556 1557 1558 1559 1560 1561 |
# File 'lib/kamelopard/classes.rb', line 1555 def to_kml(indent = 0) k = "#{' ' * indent}<Region id=\"#{@id}\">\n" k << @latlonaltbox.to_kml(indent + 4, true) unless @latlonaltbox.nil? k << @lod.to_kml(indent + 4) unless @lod.nil? k << "#{' ' * indent}</Region>\n" k end |