Class: Kamelopard::Container
- Defined in:
- lib/kamelopard/classes.rb
Overview
Abstract class corresponding to KML’s Container object.
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
Attributes inherited from Object
#comment, #kml_id, #master_only
Instance Method Summary collapse
-
#<<(a) ⇒ Object
Adds a new object to this container.
- #features=(a) ⇒ Object
-
#initialize(name = nil, options = {}) ⇒ Container
constructor
A new instance of Container.
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
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.
1026 1027 1028 1029 |
# File 'lib/kamelopard/classes.rb', line 1026 def initialize(name = nil, = {}) @features = [] super end |
Instance Method Details
#<<(a) ⇒ Object
Adds a new object to this container.
1040 1041 1042 |
# File 'lib/kamelopard/classes.rb', line 1040 def <<(a) @features << a end |
#features=(a) ⇒ Object
1031 1032 1033 1034 1035 1036 1037 |
# File 'lib/kamelopard/classes.rb', line 1031 def features=(a) if a.respond_to? :[] then @features = a else @features = [a] end end |