Class: KML::Container
Overview
A Container is an abstract base class that holds one or more Features and allows the creation of nested hierarchies.
Instance Attribute Summary collapse
-
#features ⇒ Object
Get the features in the container.
-
#plain_children ⇒ Object
Returns the value of attribute plain_children.
Attributes inherited from Feature
#address, #address_details, #description, #look_at, #metadata, #name, #phone_number, #region, #snippet, #style_selector, #style_url, #time_primitive
Attributes inherited from Object
Instance Method Summary collapse
Methods inherited from Feature
#open, #open=, #open?, #render, #visibility, #visibility=, #visibility?
Methods inherited from Object
Constructor Details
This class inherits a constructor from KML::Object
Instance Attribute Details
#features ⇒ Object
Get the features in the container
6 7 8 |
# File 'lib/kml/container.rb', line 6 def features @features end |
#plain_children ⇒ Object
Returns the value of attribute plain_children.
7 8 9 |
# File 'lib/kml/container.rb', line 7 def plain_children @plain_children end |
Instance Method Details
#parse(node) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/kml/container.rb', line 18 def parse(node) super(node) do |cld| case cld.name when 'Document' self.features << KML::Document.parse(cld) when 'Folder' self.features << KML::Folder.parse(cld) when 'NetworkLink' when 'Placemark' self.features << KML::Placemark.parse(cld) when 'GroundOverlay' when 'PhotoOverlay' when 'ScreenOverlay' else yield cld end end self end |