Class: WebHookService::InternalErrorResponse

Inherits:
Object
  • Object
show all
Defined in:
app/services/web_hook_service.rb

Constant Summary collapse

ERROR_MESSAGE =
'internal error'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeInternalErrorResponse

Returns a new instance of InternalErrorResponse.



21
22
23
24
25
# File 'app/services/web_hook_service.rb', line 21

def initialize
  @headers = Gitlab::HTTP::Response::Headers.new({})
  @body = ''
  @code = ERROR_MESSAGE
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



7
8
9
# File 'app/services/web_hook_service.rb', line 7

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



7
8
9
# File 'app/services/web_hook_service.rb', line 7

def code
  @code
end

#headersObject (readonly)

Returns the value of attribute headers.



7
8
9
# File 'app/services/web_hook_service.rb', line 7

def headers
  @headers
end

Instance Method Details

#internal_server_error?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/services/web_hook_service.rb', line 17

def internal_server_error?
  true
end

#redirection?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/services/web_hook_service.rb', line 13

def redirection?
  false
end

#success?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/services/web_hook_service.rb', line 9

def success?
  false
end