Exception: ErrorBase

Inherits:
StandardError
  • Object
show all
Defined in:
lib/error_base.rb

Instance Method Summary collapse

Constructor Details

#initialize(*message) ⇒ ErrorBase

Returns a new instance of ErrorBase.



2
3
4
5
6
7
# File 'lib/error_base.rb', line 2

def initialize( *message )
  _message = message.join(' ')
  @_code = self.class::CODE
  @_msg = _message.empty? ?
    Rack::Utils::HTTP_STATUS_CODES[@_code] : _message
end

Instance Method Details

#codeObject



9
10
11
# File 'lib/error_base.rb', line 9

def code
  @_code
end

#msgObject



13
14
15
# File 'lib/error_base.rb', line 13

def msg
  @_msg
end