Module: Ruboty::Action::ReactionAddedAction
- Included in:
- Ruboty::Action
- Defined in:
- lib/ruboty/slack_reaction_added/extension/action.rb
Instance Method Summary collapse
Instance Method Details
#allow_reaction? ⇒ Boolean
17 18 19 |
# File 'lib/ruboty/slack_reaction_added/extension/action.rb', line 17 def allow_reaction? !!@options[:allow_reaction] end |
#call(handler, message, options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/ruboty/slack_reaction_added/extension/action.rb', line 4 def call(handler, , = {}) if .reaction if allow_reaction? || reaction_only? # Ruboty.logger.info "reaction" super(handler, , ) end else unless reaction_only? super(handler, , ) end end end |
#reaction_only? ⇒ Boolean
21 22 23 |
# File 'lib/ruboty/slack_reaction_added/extension/action.rb', line 21 def reaction_only? !!@options[:reaction_only] end |