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, #master_only

Instance Method Summary collapse

Methods inherited from Feature

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

Methods included from Snippet

#snippet_to_kml

Methods inherited from Object

#_alternate_to_kml, #change, #master_only?, parse, #to_kml

Constructor Details

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

Returns a new instance of Container.


1027
1028
1029
1030
# File 'lib/kamelopard/classes.rb', line 1027

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

Instance Method Details

#<<(a) ⇒ Object

Adds a new object to this container.


1041
1042
1043
# File 'lib/kamelopard/classes.rb', line 1041

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

#features=(a) ⇒ Object


1032
1033
1034
1035
1036
1037
1038
# File 'lib/kamelopard/classes.rb', line 1032

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