Class: Gitlab::Chat::Responder::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/chat/responder/base.rb

Direct Known Subclasses

Mattermost, Slack

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(build) ⇒ Base

build - The `Ci::Build` that was executed.


10
11
12
# File 'lib/gitlab/chat/responder/base.rb', line 10

def initialize(build)
  @build = build
end

Instance Attribute Details

#buildObject (readonly)

Returns the value of attribute build


7
8
9
# File 'lib/gitlab/chat/responder/base.rb', line 7

def build
  @build
end

Instance Method Details

#failureObject

Raises:

  • (NotImplementedError)

26
27
28
# File 'lib/gitlab/chat/responder/base.rb', line 26

def failure
  raise NotImplementedError, 'You must implement #failure'
end

#pipelineObject


14
15
16
# File 'lib/gitlab/chat/responder/base.rb', line 14

def pipeline
  build.pipeline
end

#projectObject


18
19
20
# File 'lib/gitlab/chat/responder/base.rb', line 18

def project
  pipeline.project
end

#scheduled_outputObject

Raises:

  • (NotImplementedError)

34
35
36
# File 'lib/gitlab/chat/responder/base.rb', line 34

def scheduled_output
  raise NotImplementedError, 'You must implement #scheduled_output'
end

#send_response(output) ⇒ Object

Raises:

  • (NotImplementedError)

30
31
32
# File 'lib/gitlab/chat/responder/base.rb', line 30

def send_response(output)
  raise NotImplementedError, 'You must implement #send_response(output)'
end

#successObject

Raises:

  • (NotImplementedError)

22
23
24
# File 'lib/gitlab/chat/responder/base.rb', line 22

def success(*)
  raise NotImplementedError, 'You must implement #success(output)'
end