Class: CPEE::Frames::Handler
- Inherits:
-
Riddl::Implementation
- Object
- Riddl::Implementation
- CPEE::Frames::Handler
- Defined in:
- lib/cpee-frames/implementation.rb
Overview
}}}
Instance Method Summary collapse
-
#response ⇒ Object
{{{.
Instance Method Details
#response ⇒ Object
{{{
384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/cpee-frames/implementation.rb', line 384 def response data_dir = @a[1] topic = @p[1].value event_name = @p[2].value notification = JSON.parse(@p[3].value.read) instancenr = notification['instance'] content = notification['content'] activity = content['activity'] parameters = content['parameters'] receiving = content['received'] if content['values']&.any? #puts alldata['ausfuehrungen'] puts "writing file" path = File.join(data_dir,@r[0],'dataelements.json') File.write(path, JSON.dump(content['values'])) end @a[0].send(@r[0]) nil end |