Module: Omnes::Subscriber::Adapter
- Extended by:
- Configurable
- Defined in:
- lib/omnes/subscriber/adapter.rb,
lib/omnes/subscriber/adapter/method.rb,
lib/omnes/subscriber/adapter/sidekiq.rb,
lib/omnes/subscriber/adapter/active_job.rb,
lib/omnes/subscriber/adapter/method/errors.rb
Overview
Adapters to build Omnes::Subscription's callbacks
Adapters need to implement a method #call
taking the instance of
Omnes::Subscriber and the event.
Alternatively, they can be curried and only take the instance as an argument, returning a one-argument callable taking the event.
Defined Under Namespace
Modules: ActiveJob, Sidekiq Classes: Method
Class Method Summary collapse
-
.config ⇒ Configurable::Config
extended
from Configurable
Returns the configuration class.
-
.configure {|@config| ... } ⇒ Object
extended
from Configurable
Yields the configuration class.
- .nest_config(constant, name: default_nesting_name(constant)) ⇒ Object extended from Configurable private
- .setting(name, default:) ⇒ Object extended from Configurable private
-
.Type(value) ⇒ Object
private
TODO: Simplify when when we can take callables and Proc in a polymorphic way: https://bugs.ruby-lang.org/issues/18644 > builder.to_proc.curry[instance].
Class Method Details
.config ⇒ Configurable::Config Originally defined in module Configurable
Returns the configuration class
Use this class to access readers and writers for the defined settings or nested configurations
.configure {|@config| ... } ⇒ Object Originally defined in module Configurable
Yields the configuration class
.nest_config(constant, name: default_nesting_name(constant)) ⇒ Object Originally defined in module Configurable
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
.setting(name, default:) ⇒ Object Originally defined in module Configurable
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
.Type(value) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
TODO: Simplify when when we can take callables and Proc in a polymorphic way: https://bugs.ruby-lang.org/issues/18644
builder.to_proc.curry[instance]
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/omnes/subscriber/adapter.rb', line 27 def self.Type(value) case value when Symbol Type(Method.new(value)) when Proc value else value.method(:call) end end |