Module: Speculations::Parser::State::Out
Instance Method Summary collapse
Instance Method Details
#parse(line, lnb, node, _ctxt) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/speculations/parser/state/out.rb', line 6 def parse line, lnb, node, _ctxt case when match = State.context_match(line) make_new_context(lnb: lnb, node: node, match: match) when match = State.maybe_example(line) [:candidate, node, match[:title]] when match = State.maybe_include(line) [:candidate, node, :inc] else [:out, node] end end |