Exception: RubyACLException

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/rubyacl_exception.rb

Overview

To change this template, choose Tools | Templates and open the template in the editor.

Instance Method Summary collapse

Constructor Details

#initialize(called_class, called_method, _description = "Epic fail \n", _number = nil) ⇒ RubyACLException

Returns a new instance of RubyACLException.



9
10
11
12
13
14
# File 'lib/rubyacl_exception.rb', line 9

def initialize(called_class, called_method, _description = "Epic fail \n", _number = nil)
  @clas = called_class
  @method = called_method
  @description = _description + "\n"
  @number  = _number
end

Instance Method Details

#codeObject



27
28
29
# File 'lib/rubyacl_exception.rb', line 27

def code
  @number
end

#inspectObject



15
16
17
# File 'lib/rubyacl_exception.rb', line 15

def inspect
  self.tostring
end

#methodObject



31
32
33
# File 'lib/rubyacl_exception.rb', line 31

def method
  return "#{@clas}.#{@method}"
end

#to_sObject



19
20
21
# File 'lib/rubyacl_exception.rb', line 19

def to_s
  self.tostring
end

#tostringObject



23
24
25
# File 'lib/rubyacl_exception.rb', line 23

def tostring
  @number.to_s + ": " + method + "\n" + @description
end