Sha256: dc86bdaab494986b3884bbd4ea2bee290f2e3c57f9b1223676a6e7c80297b4b0

Contents?: true

Size: 566 Bytes

Versions: 3

Compression:

Stored size: 566 Bytes

Contents

module Le
  module Host

    def self.new(token, local)
      Le::Host::HTTP.new(token, local)
    end

    module InstanceMethods
      def formatter
        proc do |severity, datetime, _, msg|
          message = "#{datetime} "
          message << format_message(msg, severity)
        end
      end

      def format_message(message_in, severity)
        message_in = message_in.inspect unless message_in.is_a?(String)

        "severity=#{severity}, #{message_in.lstrip}"
      end
    end

  end
end

require File.join(File.dirname(__FILE__), 'host', 'http')

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
le-2.1.6 ./lib/le/host.rb
le-2.1.4 ./lib/le/host.rb
le-2.1.2 ./lib/le/host.rb