Class: SlackBot::Event
- Inherits:
-
Object
- Object
- SlackBot::Event
- Includes:
- Concerns::InteractionKlass, Concerns::ViewKlass
- Defined in:
- lib/slack_bot/event.rb
Instance Attribute Summary collapse
-
#callback ⇒ Object
readonly
Returns the value of attribute callback.
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#current_user ⇒ Object
readonly
Returns the value of attribute current_user.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#params ⇒ Object
readonly
Returns the value of attribute params.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(current_user: nil, params: nil, callback: nil, config: nil) ⇒ Event
constructor
A new instance of Event.
Methods included from Concerns::ViewKlass
Methods included from Concerns::InteractionKlass
Constructor Details
#initialize(current_user: nil, params: nil, callback: nil, config: nil) ⇒ Event
Returns a new instance of Event.
10 11 12 13 14 15 |
# File 'lib/slack_bot/event.rb', line 10 def initialize(current_user: nil, params: nil, callback: nil, config: nil) @current_user = current_user @params = params @callback = callback @config = config || SlackBot::Config.current_instance end |
Instance Attribute Details
#callback ⇒ Object
Returns the value of attribute callback.
9 10 11 |
# File 'lib/slack_bot/event.rb', line 9 def callback @callback end |
#config ⇒ Object (readonly)
Returns the value of attribute config.
9 10 11 |
# File 'lib/slack_bot/event.rb', line 9 def config @config end |
#current_user ⇒ Object (readonly)
Returns the value of attribute current_user.
9 10 11 |
# File 'lib/slack_bot/event.rb', line 9 def current_user @current_user end |
#metadata ⇒ Object
Returns the value of attribute metadata.
9 10 11 |
# File 'lib/slack_bot/event.rb', line 9 def @metadata end |
#params ⇒ Object (readonly)
Returns the value of attribute params.
9 10 11 |
# File 'lib/slack_bot/event.rb', line 9 def params @params end |
Instance Method Details
#call ⇒ Object
17 18 19 |
# File 'lib/slack_bot/event.rb', line 17 def call nil end |