Class: AlexaRuby::Slot
- Inherits:
-
Object
- Object
- AlexaRuby::Slot
- Defined in:
- lib/alexa_ruby/request/intent_request/slot.rb
Overview
Class that encapsulates each slot
Instance Attribute Summary collapse
-
#confirmation_status ⇒ Object
Returns the value of attribute confirmation_status.
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(slot) ⇒ Slot
constructor
Initialize slot and define its name and value.
Constructor Details
#initialize(slot) ⇒ Slot
Initialize slot and define its name and value
9 10 11 12 13 14 15 |
# File 'lib/alexa_ruby/request/intent_request/slot.rb', line 9 def initialize(slot) @slot = slot raise ArgumentError, 'Missing slot parameters' if invalid_slot? @name = @slot[:name] @value = @slot[:value] @confirmation_status = define_confirmation_status end |
Instance Attribute Details
#confirmation_status ⇒ Object
Returns the value of attribute confirmation_status.
4 5 6 |
# File 'lib/alexa_ruby/request/intent_request/slot.rb', line 4 def confirmation_status @confirmation_status end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/alexa_ruby/request/intent_request/slot.rb', line 4 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/alexa_ruby/request/intent_request/slot.rb', line 4 def value @value end |