class Aws::Lex::Conversation::Slot::Elicitor
Attributes
conversation[RW]
elicitations[RW]
Public Class Methods
new(opts = {})
click to toggle source
# File lib/aws/lex/conversation/slot/elicitor.rb, line 10 def initialize(opts = {}) self.conversation = opts.fetch(:conversation) self.elicitations = opts.fetch(:elicitations) { [] } elicitations.each do |elicitation| elicitation.conversation = conversation end end
Public Instance Methods
elicit!()
click to toggle source
# File lib/aws/lex/conversation/slot/elicitor.rb, line 22 def elicit! incomplete_elicitations.first.elicit! if elicit? end
elicit?()
click to toggle source
# File lib/aws/lex/conversation/slot/elicitor.rb, line 18 def elicit? incomplete_elicitations.any? end
Private Instance Methods
incomplete_elicitations()
click to toggle source
# File lib/aws/lex/conversation/slot/elicitor.rb, line 28 def incomplete_elicitations elicitations.select(&:elicit?) end