Class: Aws::Lex::Conversation::Handler::SlotResolution
- Inherits:
-
Base
- Object
- Base
- Aws::Lex::Conversation::Handler::SlotResolution
show all
- Defined in:
- lib/aws/lex/conversation/handler/slot_resolution.rb
Instance Attribute Summary
Attributes inherited from Base
#options, #successor
Instance Method Summary
collapse
Methods inherited from Base
#handle, #initialize
Instance Method Details
#response(conversation) ⇒ Object
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/aws/lex/conversation/handler/slot_resolution.rb', line 14
def response(conversation)
conversation.slots.values.each(&:resolve!)
unless successor
msg = 'Handler `SlotResolution` must not be the final handler in the chain'
raise Exception::MissingHandler, msg
end
successor.handle(conversation)
end
|
#will_respond?(conversation) ⇒ Boolean
8
9
10
11
12
|
# File 'lib/aws/lex/conversation/handler/slot_resolution.rb', line 8
def will_respond?(conversation)
callable = options.fetch(:respond_on) { ->(_c) { true } }
callable.call(conversation)
end
|