Class: Scout::ServerBase

Inherits:
Object
  • Object
show all
Includes:
HTTP
Defined in:
lib/scout/server_base.rb

Direct Known Subclasses

Server

Defined Under Namespace

Classes: APITimeoutError, PluginTimeoutError

Constant Summary collapse

HTTP_HEADERS =

Headers passed up with all API requests.

{ "Client-Version"  => Scout::VERSION,
"Accept-Encoding" => "gzip" }

Constants included from HTTP

HTTP::CA_FILE, HTTP::VERIFY_MODE

Method Summary

Methods included from HTTP

#build_http

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &block) ⇒ Object (private)

Forward Logger methods to an active instance, when there is one.


89
90
91
92
93
94
95
# File 'lib/scout/server_base.rb', line 89

def method_missing(meth, *args, &block)
  if (Logger::SEV_LABEL - %w[ANY]).include? meth.to_s.upcase
    @logger.send(meth, *args, &block) unless @logger.nil?
  else
    super
  end
end