class RubyRabbitmqJanus::ActionEvents

Execute this code when janus return an events in standard queue

Public Instance Methods

actions() click to toggle source

Default method using for sending a block of code

# 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

Private Instance Methods

case_events(data) click to toggle source
# File lib/generators/ruby_rabbitmq_janus/templates/actions.rb, line 18
def case_events(data)
  Rails.logger.debug "Event : #{data}"
end