Module: BlueFactory::Interactions Private

Included in:
BlueFactory
Defined in:
lib/blue_factory/modules/interactions.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Adds configuration for an interactions handler to BlueFactory. Use these APIs through the main BlueFactory module, not directly.

Instance Method Summary collapse

Instance Method Details

#interactions_handler ⇒ Proc?

Returns the currently configured feed interactions handler.

Returns:

  • (Proc, nil)

See Also:



32
33
34
# File 'lib/blue_factory/modules/interactions.rb', line 32

def interactions_handler
  @interactions_handler
end

#interactions_handler=(block) ⇒ Object

Registers a callback for incoming feed interactions.



43
44
45
# File 'lib/blue_factory/modules/interactions.rb', line 43

def interactions_handler=(block)
  @interactions_handler = block
end

#on_interactions {|interactions, context| ... } ⇒ Object

Returns the currently configured feed interactions handler.

Yield Parameters:

  • interactions (Array<Interaction>) —

    one or more received interactions

  • context (RequestContext) —

    HTTP request context, including e.g. user auth info

See Also:



20
21
22
# File 'lib/blue_factory/modules/interactions.rb', line 20

def on_interactions(&block)
  @interactions_handler = block
end