Module: Hooksmith

Defined in:
lib/hooksmith.rb,
lib/hooksmith/logger.rb,
lib/hooksmith/railtie.rb,
lib/hooksmith/version.rb,
lib/hooksmith/dispatcher.rb,
lib/hooksmith/configuration.rb,
lib/hooksmith/event_recorder.rb,
lib/hooksmith/processor/base.rb,
lib/hooksmith/config/provider.rb,
lib/hooksmith/config/event_store.rb

Overview

Provides a DSL for registering webhook processors by provider and event.

Defined Under Namespace

Modules: Config, EventRecorder, Processor Classes: Configuration, Dispatcher, Logger, MultipleProcessorsError, Railtie

Constant Summary collapse

VERSION =
'0.2.0'

Class Method Summary collapse

Class Method Details

.configurationConfiguration

Returns the configuration instance.

Returns:



27
28
29
# File 'lib/hooksmith.rb', line 27

def self.configuration
  @configuration ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Yields the configuration to a block.

Yield Parameters:



33
34
35
# File 'lib/hooksmith.rb', line 33

def self.configure
  yield(configuration)
end

.loggerLogger

Returns the gem’s logger instance.

Returns:

  • (Logger)

    the logger instance.



39
40
41
# File 'lib/hooksmith.rb', line 39

def self.logger
  Logger.instance
end