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.
1027 1028 1029 1030 |
# File 'lib/kamelopard/classes.rb', line 1027 def initialize(name = nil, = {}) @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 |