Class: DebugLogging::LambDart::Base
- Inherits:
-
Object
- Object
- DebugLogging::LambDart::Base
- Extended by:
- Forwardable
- Defined in:
- lib/debug_logging/lamb_dart/base.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
For ClassLogger, this will be the same as klass.
-
#config_proxy ⇒ Object
readonly
For ClassLogger, this will be the same as klass.
-
#decorated_method ⇒ Object
readonly
For ClassLogger, this will be the same as klass.
-
#instance ⇒ Object
readonly
For ClassLogger, this will be the same as klass.
-
#is_class ⇒ Object
readonly
For ClassLogger, this will be the same as klass.
-
#klass ⇒ Object
readonly
For ClassLogger, this will be the same as klass.
-
#kwargs ⇒ Object
readonly
For ClassLogger, this will be the same as klass.
-
#method_payload ⇒ Object
readonly
For ClassLogger, this will be the same as klass.
-
#scope_term ⇒ Object
readonly
For ClassLogger, this will be the same as klass.
Instance Method Summary collapse
-
#initialize(instance: nil, klass: nil, method_config_opts:, method_payload:, args:, kwargs:, decorated_method:) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(instance: nil, klass: nil, method_config_opts:, method_payload:, args:, kwargs:, decorated_method:) ⇒ Base
Returns a new instance of Base.
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/debug_logging/lamb_dart/base.rb', line 20 def initialize(instance: nil, klass: nil, method_config_opts:, method_payload:, args:, kwargs:, decorated_method:) @instance = instance || klass @klass = klass || instance.class @method_payload = method_payload @args = args @kwargs = kwargs @decorated_method = decorated_method @is_class = (self.klass == self.instance) @scope_term = is_class ? "class" : "instance" @config_proxy = DebugLogging::Util.config_proxy_finder( scope: self.klass, config_opts: method_config_opts, method_name: self.decorated_method, proxy_ref:, ) do |proxy| yield proxy if block_given? end end |
Instance Attribute Details
#args ⇒ Object (readonly)
For ClassLogger, this will be the same as klass
8 9 10 |
# File 'lib/debug_logging/lamb_dart/base.rb', line 8 def args @args end |
#config_proxy ⇒ Object (readonly)
For ClassLogger, this will be the same as klass
8 9 10 |
# File 'lib/debug_logging/lamb_dart/base.rb', line 8 def config_proxy @config_proxy end |
#decorated_method ⇒ Object (readonly)
For ClassLogger, this will be the same as klass
8 9 10 |
# File 'lib/debug_logging/lamb_dart/base.rb', line 8 def decorated_method @decorated_method end |
#instance ⇒ Object (readonly)
For ClassLogger, this will be the same as klass
8 9 10 |
# File 'lib/debug_logging/lamb_dart/base.rb', line 8 def instance @instance end |
#is_class ⇒ Object (readonly)
For ClassLogger, this will be the same as klass
8 9 10 |
# File 'lib/debug_logging/lamb_dart/base.rb', line 8 def is_class @is_class end |
#klass ⇒ Object (readonly)
For ClassLogger, this will be the same as klass
8 9 10 |
# File 'lib/debug_logging/lamb_dart/base.rb', line 8 def klass @klass end |
#kwargs ⇒ Object (readonly)
For ClassLogger, this will be the same as klass
8 9 10 |
# File 'lib/debug_logging/lamb_dart/base.rb', line 8 def kwargs @kwargs end |
#method_payload ⇒ Object (readonly)
For ClassLogger, this will be the same as klass
8 9 10 |
# File 'lib/debug_logging/lamb_dart/base.rb', line 8 def method_payload @method_payload end |
#scope_term ⇒ Object (readonly)
For ClassLogger, this will be the same as klass
8 9 10 |
# File 'lib/debug_logging/lamb_dart/base.rb', line 8 def scope_term @scope_term end |