Module: Desiru::Jobs::Webhookable::ClassMethods

Defined in:
lib/desiru/jobs/webhook_notifier.rb

Instance Method Summary collapse

Instance Method Details

#configure_webhook {|webhook_config| ... } ⇒ Object

Yields:



180
181
182
# File 'lib/desiru/jobs/webhook_notifier.rb', line 180

def configure_webhook
  yield(webhook_config) if block_given?
end

#webhook_configObject



176
177
178
# File 'lib/desiru/jobs/webhook_notifier.rb', line 176

def webhook_config
  @webhook_config ||= WebhookConfig.new
end

#webhook_enabled?Boolean

Returns:

  • (Boolean)


184
185
186
# File 'lib/desiru/jobs/webhook_notifier.rb', line 184

def webhook_enabled?
  webhook_config.valid?
end