Module: Less::Node::Entity
- Defined in:
- lib/less/engine/nodes/entity.rb
Instance Attribute Summary collapse
-
#parent ⇒ Object
Returns the value of attribute parent.
Instance Method Summary collapse
- #initialize(value, parent = nil) ⇒ Object
- #inspect ⇒ Object
- #path(node = self) ⇒ Object
- #root ⇒ Object
- #to_css ⇒ Object
- #to_s ⇒ Object
Instance Attribute Details
#parent ⇒ Object
Returns the value of attribute parent.
24 25 26 |
# File 'lib/less/engine/nodes/entity.rb', line 24 def parent @parent end |
Instance Method Details
#initialize(value, parent = nil) ⇒ Object
26 27 28 29 |
# File 'lib/less/engine/nodes/entity.rb', line 26 def initialize value, parent = nil super value @parent = parent end |
#inspect ⇒ Object
44 |
# File 'lib/less/engine/nodes/entity.rb', line 44 def inspect; to_s end |
#path(node = self) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/less/engine/nodes/entity.rb', line 31 def path node = self path = [] while node do path << node node = node.parent end path end |
#root ⇒ Object
40 41 42 |
# File 'lib/less/engine/nodes/entity.rb', line 40 def root path.last end |
#to_css ⇒ Object
45 |
# File 'lib/less/engine/nodes/entity.rb', line 45 def to_css; to_s end |
#to_s ⇒ Object
46 |
# File 'lib/less/engine/nodes/entity.rb', line 46 def to_s; super end |