Class: Tokite::HookEvent::BaseEvent
- Inherits:
-
Object
- Object
- Tokite::HookEvent::BaseEvent
- Defined in:
- app/models/tokite/hook_event/base_event.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#hook_params ⇒ Object
readonly
Returns the value of attribute hook_params.
Instance Method Summary collapse
-
#initialize(hook_params) ⇒ BaseEvent
constructor
A new instance of BaseEvent.
- #slack_payload(rule) ⇒ Object
Constructor Details
#initialize(hook_params) ⇒ BaseEvent
Returns a new instance of BaseEvent.
6 7 8 |
# File 'app/models/tokite/hook_event/base_event.rb', line 6 def initialize(hook_params) @hook_params = hook_params end |
Instance Attribute Details
#hook_params ⇒ Object (readonly)
Returns the value of attribute hook_params.
4 5 6 |
# File 'app/models/tokite/hook_event/base_event.rb', line 4 def hook_params @hook_params end |
Instance Method Details
#slack_payload(rule) ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/models/tokite/hook_event/base_event.rb', line 10 def slack_payload(rule) { channel: rule.channel, text: slack_text, attachments: (rule), } end |