Sha256: b2bcaeef968588f7a98c5acc0627c1aae119c4eb8591ff8fa509cf8f7ccdbee4

Contents?: true

Size: 520 Bytes

Versions: 123

Compression:

Stored size: 520 Bytes

Contents

# frozen_string_literal: true

module RubyRabbitmqJanus
  # Execute this code when janus return an events in standard queue
  class ActionEvents
    # Default method using for sending a block of code
    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

    def case_events(data)
      Rails.logger.debug "Event : #{data}"
    end
  end
end

Version data entries

123 entries across 123 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-4.0.1 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.1.pre.1265973744 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.1.pre.1265506307 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.1.pre.1265140558 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.1001345090 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.1001181479 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.1001132533 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.1001107243 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.1001043172 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.949167646 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.946892338 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.946565704 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.939149205 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.939137013 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.939133437 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.939119110 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.939113634 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-4.0.0.pre.850041590 lib/generators/ruby_rabbitmq_janus/templates/actions.rb
ruby_rabbitmq_janus-3.0.1 lib/generators/ruby_rabbitmq_janus/templates/actions.rb