Sha256: 486f851187cb5655a3b9649ddaf1f7ee698c50a601d35432111aa9ebed16e27f

Contents?: true

Size: 393 Bytes

Versions: 1

Compression:

Stored size: 393 Bytes

Contents

require "socket"

module Timber
  module Contexts
    class Server < Context
      ROOT_KEY = :server.freeze
      VERSION = 1.freeze

      def hostname
        @hostname ||= ::Socket.gethostname
      end

      private
        def json_payload
          @json_payload ||= Macros::DeepMerger.merge({
            :hostname => hostname
          }, super).freeze
        end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
timberio-1.0.0.beta1 lib/timber/contexts/server.rb