Class: Guideline::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/guideline/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ Error

Returns a new instance of Error.



5
6
7
8
9
10
# File 'lib/guideline/error.rb', line 5

def initialize(options)
  @line    = options[:line]
  @message = options[:message]
  @path    = options[:path]
  @name    = options[:name]
end

Instance Attribute Details

#lineObject (readonly)

Returns the value of attribute line.



3
4
5
# File 'lib/guideline/error.rb', line 3

def line
  @line
end

#messageObject (readonly)

Returns the value of attribute message.



3
4
5
# File 'lib/guideline/error.rb', line 3

def message
  @message
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/guideline/error.rb', line 3

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/guideline/error.rb', line 3

def path
  @path
end

Instance Method Details

#renderObject



12
13
14
# File 'lib/guideline/error.rb', line 12

def render
  "%4d: %s" % [line, message]
end