Class: AmazonEcho::IntentRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/amazon_echo/intent_request.rb

Instance Method Summary collapse

Methods inherited from Request

#initialize, #request, #request_id, #timestamp, #type

Constructor Details

This class inherits a constructor from AmazonEcho::Request

Instance Method Details

#intentObject



3
4
5
# File 'lib/amazon_echo/intent_request.rb', line 3

def intent
  @request["intent"]["name"]
end

#slot_value(slot_name) ⇒ Object



7
8
9
# File 'lib/amazon_echo/intent_request.rb', line 7

def slot_value(slot_name)
  @request["intent"]['slots'][slot_name]['value'] rescue nil
end

#slotsObject



11
12
13
# File 'lib/amazon_echo/intent_request.rb', line 11

def slots
  @request["intent"]['slots']
end