Class: Tuxedo::Error

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Error

Returns a new instance of Error.



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

def initialize(params)
  self.name = params[:name]
  self.source = params[:source]
  self.line = params[:line]
end

Instance Attribute Details

#lineObject

Returns the value of attribute line.



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

def line
  @line
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#sourceObject

Returns the value of attribute source.



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

def source
  @source
end

Instance Method Details



11
12
13
# File 'lib/tuxedo/error.rb', line 11

def print
  "#{self.source} #{self.line}"
end