class Adalog::StubLoggingAdapter::Base
Used as the superclass of all logging classes returned from ::new
Public Class Methods
new(**stub_method_overrides)
click to toggle source
Allows for overriding stubbed methods which were initially built into the mock adapter. Does not explicitly restrict “overriding” to existing stubs, and so can be used to add additional stubs to a specific instance.
# File lib/adalog/stub_logging_adapter.rb, line 51 def initialize(**stub_method_overrides) stub_method_overrides.each do |message, value| define_singleton_method(message, &StubLoggingAdapter.stub_method(message, value)) end end
repo()
click to toggle source
# File lib/adalog/stub_logging_adapter.rb, line 44 def repo ; @repo ; end
service_name()
click to toggle source
# File lib/adalog/stub_logging_adapter.rb, line 43 def service_name; @service_name ; end
Public Instance Methods
repo()
click to toggle source
# File lib/adalog/stub_logging_adapter.rb, line 60 def repo ; self.class.repo ; end
service_name()
click to toggle source
Convenience instance method versions of class-level storage of service_name
and repo.
# File lib/adalog/stub_logging_adapter.rb, line 59 def service_name; self.class.service_name ; end