Class: Clova::EventRequest

Inherits:
Request
  • Object
show all
Defined in:
lib/clova-speech/request/event_request.rb

Instance Attribute Summary collapse

Attributes inherited from Request

#context, #session, #version

Instance Method Summary collapse

Methods inherited from Request

#session_attributes

Constructor Details

#initialize(session:, context:, request:, version:) ⇒ EventRequest

Returns a new instance of EventRequest.



4
5
6
7
8
9
10
11
12
# File 'lib/clova-speech/request/event_request.rb', line 4

def initialize(session:, context:, request:, version:)
  super
  @event = request[:event]
  @namespace = @event[:namespace]
  @name = @event[:name]
  @payload = @event[:payload]

  @type = 'EventRequest'
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



3
4
5
# File 'lib/clova-speech/request/event_request.rb', line 3

def event
  @event
end

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/clova-speech/request/event_request.rb', line 3

def name
  @name
end

#namespaceObject (readonly)

Returns the value of attribute namespace.



3
4
5
# File 'lib/clova-speech/request/event_request.rb', line 3

def namespace
  @namespace
end

#payloadObject (readonly)

Returns the value of attribute payload.



3
4
5
# File 'lib/clova-speech/request/event_request.rb', line 3

def payload
  @payload
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/clova-speech/request/event_request.rb', line 3

def type
  @type
end