Module: Speculations::Parser::State::In
- Extended by:
- In
- Includes:
- Speculations::Parser::State
- Included in:
- In
- Defined in:
- lib/speculations/parser/state/in.rb
Constant Summary
Constants included from Triggers
Triggers::BLANK_RGX, Triggers::CONTEXT_RGX, Triggers::EOBLOCK_RGX, Triggers::EXAMPLE_RGX, Triggers::GIVEN_RGX, Triggers::RUBY_RGX, Triggers::SPEC_CONTEXT_RGX, Triggers::THEN_RGX
Instance Method Summary collapse
-
#parse(data) ⇒ Object
def parse line, lnb, node, ctxt, debug: true.
Methods included from Triggers
#blank_line, #context_match, #eoblock_match, #maybe_example, #maybe_include, #ruby_code_block, #spec_context_line
Instance Method Details
#parse(data) ⇒ Object
def parse line, lnb, node, ctxt, debug: true
9 10 11 12 13 14 15 16 17 |
# File 'lib/speculations/parser/state/in.rb', line 9 def parse(data) case when State.eoblock_match(data.line) #dbg_match("eblock", data) data.up_to_context else data.update(node: data.node.add_line(data.line)) end end |