Class: Kamelopard::Container

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

Overview

Abstract class corresponding to KML’s Container object.

Direct Known Subclasses

Document, Folder

Instance Attribute Summary

Attributes inherited from Feature

#abstractView, #addressDetails, #atom_author, #atom_link, #description, #extendedData, #metadata, #name, #open, #phoneNumber, #region, #snippet, #styleSelector, #styleUrl, #styles, #timeprimitive, #visibility

Attributes included from Snippet

#maxLines, #snippet_text

Attributes inherited from Object

#comment, #kml_id

Instance Method Summary collapse

Methods inherited from Feature

add_author, #hide, #show, #styles_to_kml, #timespan, #timespan=, #timestamp, #timestamp=, #to_kml

Methods included from Snippet

#snippet_to_kml

Methods inherited from Object

#change, #to_kml

Constructor Details

#initialize(name = nil, options = {}) ⇒ Container

Returns a new instance of Container.



689
690
691
692
# File 'lib/kamelopard/classes.rb', line 689

def initialize(name = nil, options = {})
    @features = []
    super
end

Instance Method Details

#<<(a) ⇒ Object

Adds a new object to this container.



703
704
705
# File 'lib/kamelopard/classes.rb', line 703

def <<(a)
    @features << a
end

#features=(a) ⇒ Object



694
695
696
697
698
699
700
# File 'lib/kamelopard/classes.rb', line 694

def features=(a)
    if a.respond_to? :[] then
        @features = a
    else
        @features = [a]
    end
end