Class: Adornable::Context
- Inherits:
-
Object
- Object
- Adornable::Context
- 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
-
#initialize(method_receiver:, method_name:, method_arguments:, decorator_name:, decorator_options:) ⇒ Context
constructor
A new instance of Context.
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 = end |