Class: Atatus::ContextBuilder Private

Inherits:
Object
  • Object
show all
Defined in:
lib/atatus/context_builder.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Constant Summary collapse

MAX_BODY_LENGTH =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

2048
SKIPPED =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

'[SKIPPED]'

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ ContextBuilder

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ContextBuilder.



26
27
28
# File 'lib/atatus/context_builder.rb', line 26

def initialize(config)
  @config = config
end

Instance Attribute Details

#configObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



30
31
32
# File 'lib/atatus/context_builder.rb', line 30

def config
  @config
end

Instance Method Details

#build(rack_env:, for_type:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



32
33
34
35
36
# File 'lib/atatus/context_builder.rb', line 32

def build(rack_env:, for_type:)
  Context.new.tap do |context|
    apply_to_request(context, rack_env: rack_env, for_type: for_type)
  end
end