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.



23
24
25
26
27
# File 'app/services/web_hook_service.rb', line 23

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end

#headersObject (readonly)

Returns the value of attribute headers.



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

def headers
  @headers
end

Instance Method Details

#internal_server_error?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'app/services/web_hook_service.rb', line 19

def internal_server_error?
  true
end

#redirection?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/services/web_hook_service.rb', line 15

def redirection?
  false
end

#success?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'app/services/web_hook_service.rb', line 11

def success?
  false
end