Class: NanDoc::Filters::SeeTest::MyStringScanner
- Inherits:
-
StringScanner
- Object
- StringScanner
- NanDoc::Filters::SeeTest::MyStringScanner
- Defined in:
- lib/nandoc/filters/builtin-tags/see-test.rb
Overview
push it up if desired
Instance Method Summary collapse
Instance Method Details
#scan_assert(foo, name = nil) ⇒ Object
56 57 58 59 60 61 62 63 64 |
# File 'lib/nandoc/filters/builtin-tags/see-test.rb', line 56 def scan_assert foo, name=nil ret = scan(foo) unless ret use_name = name ? "#{name} (/#{foo.source}/)" : "/#{foo.source}/" fail("Unable to find #{use_name} in #{rest.inspect}") end ret end |