Module: Clearbit::Slack
- Defined in:
- lib/clearbit/slack.rb,
lib/clearbit/slack/helpers.rb,
lib/clearbit/slack/version.rb,
lib/clearbit/slack/notifier.rb,
lib/clearbit/slack/configuration.rb,
lib/clearbit/slack/attachments/person.rb,
lib/clearbit/slack/attachments/company.rb
Defined Under Namespace
Modules: Attachments, Helpers
Classes: Configuration, Notifier
Constant Summary
collapse
- VERSION =
'0.2.0'
Class Method Summary
collapse
Class Method Details
.configuration ⇒ Object
30
31
32
|
# File 'lib/clearbit/slack.rb', line 30
def self.configuration
@configuration ||= Configuration.new
end
|
26
27
28
|
# File 'lib/clearbit/slack.rb', line 26
def self.configure
yield configuration if block_given?
end
|
.ping(attrs = {}, options = {}) ⇒ Object
14
15
16
|
# File 'lib/clearbit/slack.rb', line 14
def self.ping(attrs = {}, options = {})
Notifier.new(attrs, options).ping
end
|
.slack_channel ⇒ Object
22
23
24
|
# File 'lib/clearbit/slack.rb', line 22
def self.slack_channel
configuration.slack_channel || raise('Config Error: No slack_channel provided')
end
|
.slack_url ⇒ Object
18
19
20
|
# File 'lib/clearbit/slack.rb', line 18
def self.slack_url
configuration.slack_url || raise('Config Error: No slack_url provided')
end
|