Module: Less::Node::Entity

Included in:
Anonymous, Element, Function, Keyword, Literal, Property, Selector
Defined in:
lib/less/engine/nodes/entity.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parentObject

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

#inspectObject



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

#rootObject



40
41
42
# File 'lib/less/engine/nodes/entity.rb', line 40

def root
  path.last
end

#to_cssObject



45
# File 'lib/less/engine/nodes/entity.rb', line 45

def to_css;   to_s  end

#to_sObject



46
# File 'lib/less/engine/nodes/entity.rb', line 46

def to_s;     super end