Skip to content
Kward Search API index

Class: Kward::Transport::Host::Interactions

Inherits:
Object
  • Object
show all
Defined in:
lib/kward/transport/host.rb

Overview

Subscribes to questions and tool approval requests for this transport.

Instance Method Summary collapse

Constructor Details

#initialize(host) ⇒ Interactions

Returns a new instance of Interactions.



283
284
285
# File 'lib/kward/transport/host.rb', line 283

def initialize(host)
  @host = host
end

Instance Method Details

#subscribe(&block) ⇒ Object

Raises:

  • (ArgumentError)


287
288
289
290
291
# File 'lib/kward/transport/host.rb', line 287

def subscribe(&block)
  raise ArgumentError, "interaction subscription requires a block" unless block

  @host.gateway.subscribe_transport_interactions(&block)
end