Class: Txgh::Handlers::Github::Handler

Inherits:
Object
  • Object
show all
Includes:
ResponseHelpers
Defined in:
lib/txgh/handlers/github/handler.rb

Direct Known Subclasses

DeleteHandler, PushHandler

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Handler

Returns a new instance of Handler.



11
12
13
14
15
16
# File 'lib/txgh/handlers/github/handler.rb', line 11

def initialize(options = {})
  @project = options.fetch(:project)
  @repo = options.fetch(:repo)
  @payload = options.fetch(:payload)
  @logger = options.fetch(:logger) { Logger.new(STDOUT) }
end

Instance Attribute Details

#loggerObject (readonly)

Returns the value of attribute logger.



9
10
11
# File 'lib/txgh/handlers/github/handler.rb', line 9

def logger
  @logger
end

#payloadObject (readonly)

Returns the value of attribute payload.



9
10
11
# File 'lib/txgh/handlers/github/handler.rb', line 9

def payload
  @payload
end

#projectObject (readonly)

Returns the value of attribute project.



9
10
11
# File 'lib/txgh/handlers/github/handler.rb', line 9

def project
  @project
end

#repoObject (readonly)

Returns the value of attribute repo.



9
10
11
# File 'lib/txgh/handlers/github/handler.rb', line 9

def repo
  @repo
end