Class: Kamelopard::StyleSelector
- Defined in:
- lib/kamelopard/classes.rb
Overview
Abstract class corresponding to KML’s StyleSelector object.
Instance Attribute Summary collapse
-
#attached ⇒ Object
Returns the value of attribute attached.
Attributes inherited from Object
Instance Method Summary collapse
- #attach(obj) ⇒ Object
- #attached? ⇒ Boolean
-
#initialize ⇒ StyleSelector
constructor
A new instance of StyleSelector.
- #to_kml(elem = nil) ⇒ Object
Constructor Details
#initialize ⇒ StyleSelector
Returns a new instance of StyleSelector.
1068 1069 1070 1071 1072 |
# File 'lib/kamelopard/classes.rb', line 1068 def initialize super @attached = false Document.instance.styles << self end |
Instance Attribute Details
#attached ⇒ Object
Returns the value of attribute attached.
1067 1068 1069 |
# File 'lib/kamelopard/classes.rb', line 1067 def attached @attached end |
Instance Method Details
#attach(obj) ⇒ Object
1078 1079 1080 1081 |
# File 'lib/kamelopard/classes.rb', line 1078 def attach(obj) @attached = true obj.styles << self end |
#attached? ⇒ Boolean
1074 1075 1076 |
# File 'lib/kamelopard/classes.rb', line 1074 def attached? @attached end |
#to_kml(elem = nil) ⇒ Object
1083 1084 1085 1086 1087 |
# File 'lib/kamelopard/classes.rb', line 1083 def to_kml(elem = nil) elem = REXML::Element.new 'StyleSelector' if elem.nil? super elem elem end |