Class: WebPipe::DSL::InstanceContext Private

Inherits:
Module
  • Object
show all
Defined in:
lib/web_pipe/dsl/instance_context.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

PIPE_METHODS =

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.

%i[
  call middlewares operations to_proc to_middlewares
].freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(container:, class_context:) ⇒ InstanceContext

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 InstanceContext.



15
16
17
18
19
# File 'lib/web_pipe/dsl/instance_context.rb', line 15

def initialize(container:, class_context:)
  @container = container
  @class_context = class_context
  super()
end

Instance Attribute Details

#class_contextObject (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.



13
14
15
# File 'lib/web_pipe/dsl/instance_context.rb', line 13

def class_context
  @class_context
end

#containerObject (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.



13
14
15
# File 'lib/web_pipe/dsl/instance_context.rb', line 13

def container
  @container
end

Instance Method Details

#included(klass) ⇒ 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.



21
22
23
24
# File 'lib/web_pipe/dsl/instance_context.rb', line 21

def included(klass)
  define_initialize(klass, class_context.ast, container)
  define_pipe_methods(klass)
end