Class: StyleSelector

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

Overview

Abstract class corresponding to KML’s StyleSelector object.

Direct Known Subclasses

Style, StyleMap

Instance Attribute Summary collapse

Attributes inherited from KMLObject

#comment, #id

Instance Method Summary collapse

Methods inherited from KMLObject

#to_kml

Constructor Details

#initializeStyleSelector

Returns a new instance of StyleSelector.



1004
1005
1006
1007
1008
# File 'lib/kamelopard/classes.rb', line 1004

def initialize
    super
    @attached = false
    Document.instance.styles << self
end

Instance Attribute Details

#attachedObject

Returns the value of attribute attached.



1003
1004
1005
# File 'lib/kamelopard/classes.rb', line 1003

def attached
  @attached
end

Instance Method Details

#attach(obj) ⇒ Object



1014
1015
1016
1017
# File 'lib/kamelopard/classes.rb', line 1014

def attach(obj)
    @attached = true
    obj.styles << self
end

#attached?Boolean

Returns:

  • (Boolean)


1010
1011
1012
# File 'lib/kamelopard/classes.rb', line 1010

def attached?
    @attached
end