Module: Stylish::Tree::Leaf

Includes:
Node
Included in:
Comment, Rule
Defined in:
lib/stylish/tree.rb

Overview

Leaves cannot have further nodes attached to them, and cannot root selector trees. When a tree is serialised, it is the leaf nodes which are the ultimate objects of serialisation, where the recursive process ends.

Instance Method Summary collapse

Methods included from Node

#root?

Instance Method Details

#leaf?Boolean

Leaves are leaves.

Returns:

  • (Boolean)


34
35
36
# File 'lib/stylish/tree.rb', line 34

def leaf?
  true
end