Class: OpenVidu::Responder
- Inherits:
-
Object
- Object
- OpenVidu::Responder
- Defined in:
- lib/open_vidu/responder.rb
Overview
Responder
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
Returns the value of attribute object.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
Instance Attribute Details
#object ⇒ Object (readonly)
Returns the value of attribute object.
4 5 6 |
# File 'lib/open_vidu/responder.rb', line 4 def object @object end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
4 5 6 |
# File 'lib/open_vidu/responder.rb', line 4 def response @response end |
Instance Method Details
#execute(server, object, response) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/open_vidu/responder.rb', line 6 def execute(server, object, response) @object = object @response = response klass = Object.const_get(klass_name) return true if record_destroyed? return klass.new(server, mapped_params(response)) if complete_record? return klass.new(server).find(response['id']) if record_lookup? response[content_key].map { |hash| klass.new(server, mapped_params(hash)) } end |