Class: Adornable::Context

Inherits:
Object
  • Object
show all
Defined in:
lib/adornable/context.rb

Overview

A context object is passed to the decorator method, and contains information about the decorated method being called.

Instance Method Summary collapse

Constructor Details

#initialize(method_receiver:, method_name:, method_arguments:, method_positional_args:, method_kwargs:, decorator_name:, decorator_options:) ⇒ Context

Returns a new instance of Context.



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/adornable/context.rb', line 17

def initialize(
  method_receiver:,
  method_name:,
  method_arguments:,
  method_positional_args:,
  method_kwargs:,
  decorator_name:,
  decorator_options:
)
  @method_receiver = method_receiver
  @method_name = method_name
  @method_arguments = method_arguments
  @method_positional_args = method_positional_args
  @method_kwargs = method_kwargs
  @decorator_name = decorator_name
  @decorator_options = decorator_options
end