Sha256: 3f9a962819c460f3d73c632c9a66cf42a2766ec1db575284e049a32003981bec

Contents?: true

Size: 654 Bytes

Versions: 3

Compression:

Stored size: 654 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, progname, msg|
	  	message = "#{datetime} "
      	message << format_message(msg, severity)
    end
	end
  
      def format_message(message_in, severity)
		message_in = message_in.lstrip

		message_out = ""
		message_out = "severity=#{severity}, "
		case message_in
		when String
		  message_out << message_in
		else
		  message_out << message_in.inspect
		end
		message_out
      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.3 ./lib/le/host.rb
le-2.1.1 ./lib/le/host.rb
le-2.1 ./lib/le/host.rb