Exception: SharkOnLambda::Errors::Base

Inherits:
StandardError
  • Object
show all
Defined in:
lib/shark_on_lambda/errors/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#codeObject

Returns the value of attribute code.



6
7
8
# File 'lib/shark_on_lambda/errors/base.rb', line 6

def code
  @code
end

#detailObject



15
16
17
18
19
20
# File 'lib/shark_on_lambda/errors/base.rb', line 15

def detail
  return @detail if @detail.present?
  return nil if message == self.class.name

  message
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/shark_on_lambda/errors/base.rb', line 6

def id
  @id
end

#metaObject

Returns the value of attribute meta.



6
7
8
# File 'lib/shark_on_lambda/errors/base.rb', line 6

def meta
  @meta
end

#parameterObject

Returns the value of attribute parameter.



6
7
8
# File 'lib/shark_on_lambda/errors/base.rb', line 6

def parameter
  @parameter
end

#pointerObject

Returns the value of attribute pointer.



6
7
8
# File 'lib/shark_on_lambda/errors/base.rb', line 6

def pointer
  @pointer
end

Class Method Details

.status(status_code) ⇒ Object



9
10
11
12
13
# File 'lib/shark_on_lambda/errors/base.rb', line 9

def self.status(status_code)
  define_method :status do
    status_code
  end
end

Instance Method Details

#titleObject



22
23
24
# File 'lib/shark_on_lambda/errors/base.rb', line 22

def title
  Rack::Utils::HTTP_STATUS_CODES[status]
end