Class: Ruber::SyntaxChecker::SyntaxError

Inherits:
Struct
  • Object
show all
Defined in:
plugins/syntax_checker/syntax_checker.rb,
plugins/syntax_checker/syntax_checker.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

API for feature syntax_checker

Instance Attribute Details

- (Object) column

Returns the value of attribute column

Returns:

  • (Object)

    the current value of column



65
66
67
# File 'plugins/syntax_checker/syntax_checker.rb', line 65

def column
  @column
end

- (Object) formatted_message

Returns the value of attribute formatted_message

Returns:

  • (Object)

    the current value of formatted_message



65
66
67
# File 'plugins/syntax_checker/syntax_checker.rb', line 65

def formatted_message
  @formatted_message
end

- (Object) line

Returns the value of attribute line

Returns:

  • (Object)

    the current value of line



65
66
67
# File 'plugins/syntax_checker/syntax_checker.rb', line 65

def line
  @line
end

- (Object) message

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



65
66
67
# File 'plugins/syntax_checker/syntax_checker.rb', line 65

def message
  @message
end

Instance Method Details

- (Object) format



69
70
71
72
73
74
75
76
77
# File 'plugins/syntax_checker/syntax_checker.rb', line 69

def format
  res = ""
  res << KDE.i18n("Line %d") % (line + 1) if line
  res << KDE.i18n(", column %d") % (column + 1) if line and column
  msg = formatted_message || message
  res << ": " if msg and !res.empty?
  res << msg
  res
end