Sha256: 2e59e59167174a4f892fb04c4dab3aa53a38383ac81728be02a4eb44790319cf
Contents?: true
Size: 768 Bytes
Versions: 5
Compression:
Stored size: 768 Bytes
Contents
require "forwardable" module GlassOctopus # Message context. Wraps a Kafka message and adds some convenience methods. # # @!attribute [rw] logger # A logger object. Defaults to the application logger. # @!attribute [r] message # A message read from Kafka. # @return [Message] class Context extend Forwardable attr_reader :message attr_accessor :logger # @!method [](key) # Retrieves the +value+ object corresponding to the +key+ object. # @param key key to retrieve # @!method []=(key, value) # Associates +value+ with +key+. def_delegators :@data, :[], :[]= # @api private def initialize(message, logger) @data = {} @message = message @logger = logger end end end
Version data entries
5 entries across 5 versions & 1 rubygems