class Eezee::Configuration

Attributes

services[R]

Public Class Methods

new() click to toggle source
# File lib/eezee/configuration.rb, line 7
def initialize
  @services = {}
end

Public Instance Methods

add_service(name, options) click to toggle source
# File lib/eezee/configuration.rb, line 11
def add_service(name, options)
  return unless name && options

  @services[name] = Request.new(options)
end
find_service(name) click to toggle source
# File lib/eezee/configuration.rb, line 17
def find_service(name)
  @services[name]
end
request_by(request, options) click to toggle source
# File lib/eezee/configuration.rb, line 21
def request_by(request, options)
  Marshal.dump(request&.attributes || {})
         .then { |dumped| Marshal.load(dumped) } # rubocop:disable Security/MarshalLoad
         .then { |attrs| attrs.merge(options || {}) }
         .then { |attrs| Request.new(attrs) }
end