Class: TxghServer::Webhooks::Git::DeleteHandler

Inherits:
Object
  • Object
show all
Includes:
ResponseHelpers
Defined in:
lib/txgh-server/webhooks/git/delete_handler.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project, repo, logger, attributes) ⇒ DeleteHandler

Returns a new instance of DeleteHandler.



9
10
11
12
13
14
# File 'lib/txgh-server/webhooks/git/delete_handler.rb', line 9

def initialize(project, repo, logger, attributes)
  @project = project
  @repo = repo
  @logger = logger
  @attributes = attributes
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



7
8
9
# File 'lib/txgh-server/webhooks/git/delete_handler.rb', line 7

def attributes
  @attributes
end

#loggerObject (readonly)

Returns the value of attribute logger.



7
8
9
# File 'lib/txgh-server/webhooks/git/delete_handler.rb', line 7

def logger
  @logger
end

#projectObject (readonly)

Returns the value of attribute project.



7
8
9
# File 'lib/txgh-server/webhooks/git/delete_handler.rb', line 7

def project
  @project
end

#repoObject (readonly)

Returns the value of attribute repo.



7
8
9
# File 'lib/txgh-server/webhooks/git/delete_handler.rb', line 7

def repo
  @repo
end

Instance Method Details

#executeObject



16
17
18
19
# File 'lib/txgh-server/webhooks/git/delete_handler.rb', line 16

def execute
  perform_delete if should_handle_request?
  respond_with(200, true)
end