Class: GitLabSystemHooksReceiver

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab-system-hooks-receiver.rb,
lib/gitlab-system-hooks-receiver/version.rb

Constant Summary collapse

VERSION =
"0.0.1"

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ GitLabSystemHooksReceiver

Returns a new instance of GitLabSystemHooksReceiver.



25
26
27
# File 'lib/gitlab-system-hooks-receiver.rb', line 25

def initialize(options={})
  @options = symbolize_options(options)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object (private)



114
115
116
117
118
119
120
# File 'lib/gitlab-system-hooks-receiver.rb', line 114

def method_missing(name, *args)
  if name =~ /\Aprocess_.*_event\z/
    puts name
  else
    super
  end
end

Instance Method Details

#call(env) ⇒ Object



29
30
31
32
33
34
# File 'lib/gitlab-system-hooks-receiver.rb', line 29

def call(env)
  request = Rack::Request.new(env)
  response = Rack::Response.new
  process(request, response)
  response.to_a
end