class
Sheen::Tree::Filter
- Sheen::Tree::Filter
- Sheen::Tree::Children
- Reference
- Object
Overview
A predicate-filtered, readonly view over another Children.
Defined in:
sheen/tree.crConstructors
-
.new(data : Children)
Wraps data.
Instance Method Summary
-
#at(index : Int32) : Node | Nil
The index-th passing node, or nil if out of range.
-
#filter(&block : Node, Int32 -> Bool) : Filter
The filter block that, given the node and its index in the wrapped data, decides whether each node is kept or filtered out.
-
#length : Int32
The number of passing nodes.
Instance methods inherited from class Sheen::Tree::Children
at(index : Int32) : Node | Nil
at,
length : Int32
length
Constructor Detail
Instance Method Detail
The index-th passing node, or nil if out of range.
The filter block that, given the node and its index in the wrapped data, decides whether each node is kept or filtered out.
Returns self.