class BELParser::Expression::Filter
Filter
will enumerate {BELParser::Parsers::AST::Node AST
nodes} that make up BEL
expressions. It selects the relevant nodes from an {BELParser::Parsers::AST::Node AST
node} enumerator.
Constants
- TYPES
Represents
BEL
expression node types.
Public Class Methods
new(ast_enum)
click to toggle source
# File lib/bel_parser/expression/filter.rb, line 18 def initialize(ast_enum) @ast_filter = BELParser::ASTFilter.new(ast_enum, *TYPES) end
Public Instance Methods
each(&block)
click to toggle source
# File lib/bel_parser/expression/filter.rb, line 22 def each(&block) if block_given? @ast_filter.each(&block) else enum_for(:each) end end