Module: EDI::Postable
- Included in:
- Job
- Defined in:
- lib/edi/postable.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
31 32 33 34 |
# File 'lib/edi/postable.rb', line 31 def self.included(base) base.send(:extend, ClassMethods) base.send(:environment, :slack_webhook_url) end |
Instance Method Details
#post_to_slack(message:, channel: nil) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/edi/postable.rb', line 21 def post_to_slack(message:, channel: nil) begin validate_environment rescue EDI::UnfitEnvironmentException return end _actually_post(message: , channel: channel) end |