Sha256: 3a8753c9e12cf9f60a7bcca993e8b8bd3911e18f1e919ba94db522848911c36d

Contents?: true

Size: 397 Bytes

Versions: 5

Compression:

Stored size: 397 Bytes

Contents

module Timber
  # Base class for `Timber::Events::*`
  # @private
  class Event
    def message
      raise NotImplementedError.new
    end

    def as_json(options = {})
      raise NotImplementedError.new
    end

    def to_json(options = {})
      as_json.to_json(options)
    end

    def to_msgpack(*args)
      as_json.to_msgpack(*args)
    end

    def to_s
      message
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
timber-1.1.14 lib/timber/event.rb
timber-1.1.13 lib/timber/event.rb
timber-1.1.12 lib/timber/event.rb
timber-1.1.11 lib/timber/event.rb
timber-1.1.10 lib/timber/event.rb