class Slaw::Parse::ParseError
Attributes
column[RW]
line[RW]
Public Class Methods
new(message, opts)
click to toggle source
Calls superclass method
# File lib/slaw/parse/error.rb, line 6 def initialize(message, opts) super(message) self.line = opts[:line] self.column = opts[:column] end
Public Instance Methods
to_json(g=nil)
click to toggle source
TODO: move this elsewhere, it's out of context here
# File lib/slaw/parse/error.rb, line 14 def to_json(g=nil) msg = self.message msg = msg[0..200] + '...' if msg.length > 200 { message: msg, line: self.line, column: self.column, }.to_json(g) end