Class: Aws::Lex::Conversation::Slot::Elicitor
- Inherits:
-
Object
- Object
- Aws::Lex::Conversation::Slot::Elicitor
- Defined in:
- lib/aws/lex/conversation/slot/elicitor.rb
Instance Attribute Summary collapse
-
#conversation ⇒ Object
Returns the value of attribute conversation.
-
#elicitations ⇒ Object
Returns the value of attribute elicitations.
Instance Method Summary collapse
- #elicit! ⇒ Object
- #elicit? ⇒ Boolean
-
#initialize(opts = {}) ⇒ Elicitor
constructor
A new instance of Elicitor.
Constructor Details
#initialize(opts = {}) ⇒ Elicitor
Returns a new instance of Elicitor.
10 11 12 13 14 15 16 |
# 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 |
Instance Attribute Details
#conversation ⇒ Object
Returns the value of attribute conversation.
8 9 10 |
# File 'lib/aws/lex/conversation/slot/elicitor.rb', line 8 def conversation @conversation end |
#elicitations ⇒ Object
Returns the value of attribute elicitations.
8 9 10 |
# File 'lib/aws/lex/conversation/slot/elicitor.rb', line 8 def elicitations @elicitations end |
Instance Method Details
#elicit! ⇒ Object
22 23 24 |
# File 'lib/aws/lex/conversation/slot/elicitor.rb', line 22 def elicit! incomplete_elicitations.first.elicit! if elicit? end |
#elicit? ⇒ Boolean
18 19 20 |
# File 'lib/aws/lex/conversation/slot/elicitor.rb', line 18 def elicit? incomplete_elicitations.any? end |