Class: Marko::Markup::Parser::Origin
- Inherits:
-
Struct
- Object
- Struct
- Marko::Markup::Parser::Origin
- Defined in:
- lib/marko/markup/parser.rb
Instance Method Summary collapse
Instance Method Details
#header ⇒ Object
58 59 60 |
# File 'lib/marko/markup/parser.rb', line 58 def header @header ||= markup.lines.first end |
#level ⇒ Object
62 63 64 |
# File 'lib/marko/markup/parser.rb', line 62 def level @level ||= header.scan(/^#*/).first.size end |
#to_s ⇒ Object
66 67 68 |
# File 'lib/marko/markup/parser.rb', line 66 def to_s "#{origin}:#{lineno.to_s.rjust(2,'0')} >> #{header}".strip end |