Exception: Smartdown::Parser::ParseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/smartdown/parser/flow_interpreter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename, parse_error) ⇒ ParseError



10
11
12
13
# File 'lib/smartdown/parser/flow_interpreter.rb', line 10

def initialize(filename, parse_error)
  @filename = filename
  @parse_error = parse_error
end

Instance Attribute Details

#filenameObject (readonly)

Returns the value of attribute filename.



8
9
10
# File 'lib/smartdown/parser/flow_interpreter.rb', line 8

def filename
  @filename
end

#parse_errorObject (readonly)

Returns the value of attribute parse_error.



8
9
10
# File 'lib/smartdown/parser/flow_interpreter.rb', line 8

def parse_error
  @parse_error
end

Instance Method Details

#to_s(full = true) ⇒ Object



15
16
17
# File 'lib/smartdown/parser/flow_interpreter.rb', line 15

def to_s(full = true)
  "Parse error in '#{filename}':\n\n" + @parse_error.cause.ascii_tree
end