Class: Less::Node::Selector
- Includes:
- Entity
- Defined in:
- lib/less/engine/nodes/selector.rb
Direct Known Subclasses
Constant Summary collapse
- Selectors =
{ :Descendant => '', :Child => '>', :Adjacent => '+', :Pseudo => ':', :Sibling => '~' }
Instance Attribute Summary
Attributes included from Entity
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Selector
constructor
A new instance of Selector.
Methods included from Entity
#inspect, #path, #root, #to_css, #to_s
Methods inherited from String
#blank?, #column_of, #indent, #line_of, #tabto, #treetop_camelize
Constructor Details
#initialize ⇒ Selector
Returns a new instance of Selector.
14 15 16 |
# File 'lib/less/engine/nodes/selector.rb', line 14 def initialize super Selectors[ self.class.to_s.split('::').last.to_sym ] end |
Class Method Details
.[](key) ⇒ Object
18 19 20 |
# File 'lib/less/engine/nodes/selector.rb', line 18 def self.[] key Node.const_get(Selectors.find {|k, v| v == key }.first) end |