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.



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

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.



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

def line
  @line
end

#linenoObject (readonly)

Returns the value of attribute lineno.



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

def lineno
  @lineno
end

#msgObject (readonly)

Returns the value of attribute msg.



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

def msg
  @msg
end

#nameObject (readonly)

Returns the value of attribute name.



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

def name
  @name
end

Instance Method Details

#to_sObject



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

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