Exception: TomParse::ParseError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/tomparse/parse_error.rb

Overview

Raised when comment can’t be parsed, which means it’s most likely not valid TomDoc.

Instance Method Summary collapse

Constructor Details

#initialize(doc) ⇒ ParseError

Create new ParseError object.

Parameters:

  • doc

    document string



11
12
13
# File 'lib/tomparse/parse_error.rb', line 11

def initialize(doc)
  @doc = doc
end

Instance Method Details

#messageObject

Provide access to document string.

Returns:

  • String.



18
19
20
# File 'lib/tomparse/parse_error.rb', line 18

def message
  @doc
end

#to_sObject

Provide access to document string.

Returns:

  • String.



25
26
27
# File 'lib/tomparse/parse_error.rb', line 25

def to_s
  @doc
end