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.



121
122
123
# File 'lib/mof/helper.rb', line 121

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.



120
121
122
# File 'lib/mof/helper.rb', line 120

def line
  @line
end

#linenoObject (readonly)

Returns the value of attribute lineno.



120
121
122
# File 'lib/mof/helper.rb', line 120

def lineno
  @lineno
end

#msgObject (readonly)

Returns the value of attribute msg.



120
121
122
# File 'lib/mof/helper.rb', line 120

def msg
  @msg
end

#nameObject (readonly)

Returns the value of attribute name.



120
121
122
# File 'lib/mof/helper.rb', line 120

def name
  @name
end

Instance Method Details

#to_sObject



124
125
126
# File 'lib/mof/helper.rb', line 124

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