Class: SlackBot::Event

Inherits:
Object
  • Object
show all
Includes:
Concerns::InteractionKlass, Concerns::ViewKlass
Defined in:
lib/slack_bot/event.rb,
sig/slack_bot.rbs

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concerns::ViewKlass

included

Methods included from Concerns::InteractionKlass

included

Constructor Details

#initialize(current_user: nil, params: nil, callback: nil, config: nil) ⇒ Event

Returns a new instance of Event.

Parameters:

  • current_user: (Object) (defaults to: nil)
  • params: (Hash[String, untyped]) (defaults to: nil)
  • callback: (Callback, nil) (defaults to: nil)
  • config: (Config) (defaults to: nil)


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

#callbackCallback?

Returns the value of attribute callback.

Returns:



9
10
11
# File 'lib/slack_bot/event.rb', line 9

def callback
  @callback
end

#configConfig (readonly)

Returns the value of attribute config.

Returns:



9
10
11
# File 'lib/slack_bot/event.rb', line 9

def config
  @config
end

#current_userObject? (readonly)

Returns the value of attribute current_user.

Returns:

  • (Object, nil)


9
10
11
# File 'lib/slack_bot/event.rb', line 9

def current_user
  @current_user
end

#metadataHash[String, untyped]?

Returns the value of attribute metadata.

Returns:

  • (Hash[String, untyped], nil)


9
10
11
# File 'lib/slack_bot/event.rb', line 9

def 
  @metadata
end

#paramsHash[String, untyped]? (readonly)

Returns the value of attribute params.

Returns:

  • (Hash[String, untyped], nil)


9
10
11
# File 'lib/slack_bot/event.rb', line 9

def params
  @params
end

Instance Method Details

#callObject

Returns:

  • (Object)


17
18
19
# File 'lib/slack_bot/event.rb', line 17

def call
  nil
end