Sha256: 22cbe362f8daf758dd013be918530358b2bd0c08165c3dedb2a7c5d3ebdffec3

Contents?: true

Size: 578 Bytes

Versions: 35

Compression:

Stored size: 578 Bytes

Contents

# frozen_string_literal: true

class LHC::Interceptor

  attr_reader :request

  def initialize(request)
    @request = request
  end

  def response
    @request.response
  end

  def before_raw_request; end

  def before_request; end

  def after_request; end

  def before_response; end

  def after_response; end

  # Prevent Interceptors from beeing duplicated!
  # Their classes have flag-character.
  # When duplicated you can't check for their class name anymore:
  # e.g. options.deep_dup[:interceptors].include?(LHC::Caching) # false
  def self.dup
    self
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
lhc-13.0.0 lib/lhc/interceptor.rb
lhc-12.3.0 lib/lhc/interceptor.rb
lhc-12.2.1 lib/lhc/interceptor.rb
lhc-12.2.0 lib/lhc/interceptor.rb
lhc-12.1.3 lib/lhc/interceptor.rb
lhc-12.1.2 lib/lhc/interceptor.rb
lhc-12.1.1 lib/lhc/interceptor.rb
lhc-12.1.0 lib/lhc/interceptor.rb
lhc-12.0.3 lib/lhc/interceptor.rb
lhc-12.0.2 lib/lhc/interceptor.rb
lhc-12.0.1 lib/lhc/interceptor.rb
lhc-12.0.0 lib/lhc/interceptor.rb
lhc-11.2.0 lib/lhc/interceptor.rb
lhc-11.1.1 lib/lhc/interceptor.rb
lhc-11.1.0 lib/lhc/interceptor.rb
lhc-11.0.2 lib/lhc/interceptor.rb
lhc-11.0.1 lib/lhc/interceptor.rb
lhc-11.0.0 lib/lhc/interceptor.rb
lhc-10.5.4 lib/lhc/interceptor.rb
lhc-10.5.3 lib/lhc/interceptor.rb