Class: RubyRabbitmqJanus::ActionEvents

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/ruby_rabbitmq_janus/templates/actions.rb

Overview

Execute this code when janus return an events in standard queue

Instance Method Summary collapse

Instance Method Details

#actionsObject

Default method using for sending a block of code



7
8
9
10
11
12
13
14
# File 'lib/generators/ruby_rabbitmq_janus/templates/actions.rb', line 7

def actions
  lambda do |reason, data|
    Rails.logger.debug "Execute block code with reason : #{reason}"
    case reason
    when event then case_events(data.to_hash)
    end
  end
end