Class: Specular::Integration::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/specular/integration.rb

Direct Known Subclasses

GitHub, Slack

Class Method Summary collapse

Class Method Details

.arguments(*args) ⇒ Object



19
20
21
22
23
24
25
# File 'lib/specular/integration.rb', line 19

def self.arguments(*args)
  define_singleton_method(:extract_args) do |context|
    args.to_h do |arg|
      [ arg, context[arg] ]
    end
  end
end

.handler(*names) ⇒ Object



13
14
15
16
17
# File 'lib/specular/integration.rb', line 13

def self.handler(*names)
  names.each do |name|
    INTEGRATIONS[name] = self
  end
end