Class: Kamelopard::Folder
- Defined in:
- lib/kamelopard/classes.rb
Overview
Corresponds to KML’s Folder object.
Instance Attribute Summary collapse
-
#folders ⇒ Object
Returns the value of attribute folders.
-
#parent_folder ⇒ Object
Returns the value of attribute parent_folder.
-
#styles ⇒ Object
Returns the value of attribute styles.
Attributes inherited from Feature
#abstractView, #addressDetails, #atom_author, #atom_link, #description, #extendedData, #metadata, #name, #open, #phoneNumber, #region, #snippet, #styleSelector, #styleUrl, #timeprimitive, #visibility
Attributes included from Snippet
Attributes inherited from Object
Instance Method Summary collapse
-
#has_parent? ⇒ Boolean
Folders can have parent folders; returns true if this folder has one.
-
#initialize(name = nil, options = {}) ⇒ Folder
constructor
A new instance of Folder.
- #to_kml(elem = nil) ⇒ Object
Methods inherited from Container
Methods inherited from Feature
add_author, #hide, #show, #styles_to_kml, #timespan, #timespan=, #timestamp, #timestamp=
Methods included from Snippet
Methods inherited from Object
Constructor Details
Instance Attribute Details
#folders ⇒ Object
Returns the value of attribute folders.
710 711 712 |
# File 'lib/kamelopard/classes.rb', line 710 def folders @folders end |
#parent_folder ⇒ Object
Returns the value of attribute parent_folder.
710 711 712 |
# File 'lib/kamelopard/classes.rb', line 710 def parent_folder @parent_folder end |
#styles ⇒ Object
Returns the value of attribute styles.
710 711 712 |
# File 'lib/kamelopard/classes.rb', line 710 def styles @styles end |
Instance Method Details
#has_parent? ⇒ Boolean
Folders can have parent folders; returns true if this folder has one
749 750 751 |
# File 'lib/kamelopard/classes.rb', line 749 def has_parent? not @parent_folder.nil? end |
#to_kml(elem = nil) ⇒ Object
735 736 737 738 739 740 741 742 743 744 745 746 |
# File 'lib/kamelopard/classes.rb', line 735 def to_kml(elem = nil) h = XML::Node.new 'Folder' super h @features.each do |a| a.to_kml(h) end @folders.each do |a| a.to_kml(h) end elem << h unless elem.nil? h end |