Exception: MOF::Helper::Error

Inherits:
SyntaxError
  • Object
show all
Defined in:
lib/mof/helper.rb

Overview

to be used to flag @style issues

Direct Known Subclasses

ParserError, ScannerError, StyleError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, lineno, line, msg) ⇒ Error

Returns a new instance of Error.



100
101
102
# File 'lib/mof/helper.rb', line 100

def initialize name, lineno, line, msg
  @name,@lineno,@line,@msg = name, lineno, line, msg
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



99
100
101
# File 'lib/mof/helper.rb', line 99

def line
  @line
end

#linenoObject (readonly)

Returns the value of attribute lineno.



99
100
101
# File 'lib/mof/helper.rb', line 99

def lineno
  @lineno
end

#msgObject (readonly)

Returns the value of attribute msg.



99
100
101
# File 'lib/mof/helper.rb', line 99

def msg
  @msg
end

#nameObject (readonly)

Returns the value of attribute name.



99
100
101
# File 'lib/mof/helper.rb', line 99

def name
  @name
end

Instance Method Details

#to_sObject



103
104
105
# File 'lib/mof/helper.rb', line 103

def to_s
  "#{@name}:#{@lineno}: #{line}\n#{msg}"
end