Method: Slaw::Parse::ParseError#to_json
- Defined in:
- lib/slaw/parse/error.rb
#to_json(g = nil) ⇒ Object
TODO: move this elsewhere, it’s out of context here
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/slaw/parse/error.rb', line 14 def to_json(g=nil) msg = self. msg = msg[0..200] + '...' if msg.length > 200 { message: msg, line: self.line, column: self.column, }.to_json(g) end |