class Tidyerr

Parameterized error message.

Attributes

column[R]

Error parameter.

line[R]

Error parameter.

message[R]

Error parameter.

severity[R]

Error parameter.

Public Class Methods

new(error) click to toggle source

Create new instance.

Calls superclass method
# File lib/tidy/tidyerr.rb, line 11
def initialize(error)
  super(error.to_s)
  parameterize
end

Protected Instance Methods

parameterize() click to toggle source

Parse error message into parameters (where applicable).

# File lib/tidy/tidyerr.rb, line 18
def parameterize
  if to_str[0,4] == 'line'
    tokens    = to_str.split(' ', 7)
    @severity = tokens[5][0,1] # W or E

    @line     = tokens[1].to_i
    @column   = tokens[3].to_i
    @message  = tokens[6]
  end
end