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:, decorator_name:, decorator_options:) ⇒ Context

Returns a new instance of Context.



15
16
17
18
19
20
21
# File 'lib/adornable/context.rb', line 15

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