Method: Mist::CodeExampleParser::Example#explicit_filename
- Defined in:
- lib/mist/code_example_parser.rb
#explicit_filename ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/mist/code_example_parser.rb', line 16 def explicit_filename @explicit_filename ||= if self =~ FILENAME_REGEXP # omit filename from self match = $~ @whitespace_skipped += match.offset(0)[1] - match.offset(0)[0] sub! match[0], '' match[1] else nil end end |