Class: Text::Gen::Segment::Reference
- Inherits:
-
Object
- Object
- Text::Gen::Segment::Reference
- Defined in:
- lib/text/gen/segment/reference.rb
Constant Summary collapse
- REFERENCE_MATCHER =
/\[\s*([a-z0-9-]+(?::[a-z0-9i]+)*)\s*\]/
Class Method Summary collapse
Class Method Details
.scan(scanner) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/text/gen/segment/reference.rb', line 9 def scan(scanner) str = scanner.scan(REFERENCE_MATCHER) return unless str { "type" => "reference", "text" => scanner[1], "filters" => [], "meta" => {} } end |