class BELParser::Script::Filter
Filter
will enumerate {BELParser::Parsers::AST::Node AST
nodes} that are relevant to lines in a BEL
Script
document. It selects the relevant nodes from an {BELParser::Parsers::AST::Node AST
node} enumerator.
Constants
Public Class Methods
new(ast_enum)
click to toggle source
# File lib/bel_parser/script/filter.rb, line 22 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/script/filter.rb, line 26 def each(&block) if block_given? @ast_filter.each(&block) else enum_for(:each) end end