Class: Gamefic::Scanner::Nesting
- Defined in:
- lib/gamefic/scanner/nesting.rb
Overview
Strict scanning for entities inside of other entities, e.g., ‘sock inside drawer`.
Direct Known Subclasses
Constant Summary collapse
- NEST_REGEXP =
/ in | on | of | from | inside | inside of | from inside | off | out | out of /.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Gamefic::Scanner::Base
Instance Method Details
#scan ⇒ Object
14 15 16 17 18 |
# File 'lib/gamefic/scanner/nesting.rb', line 14 def scan return unmatched_result unless token =~ NEST_REGEXP denest selection, token end |
#subprocessor ⇒ Object
10 11 12 |
# File 'lib/gamefic/scanner/nesting.rb', line 10 def subprocessor Strict end |