Class: RailsConsolePro::Services::QueueInsightFetcher::Adapters::Base
- Inherits:
-
Object
- Object
- RailsConsolePro::Services::QueueInsightFetcher::Adapters::Base
- Defined in:
- lib/rails_console_pro/services/queue_insight_fetcher.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#queue_adapter ⇒ Object
readonly
Returns the value of attribute queue_adapter.
Instance Method Summary collapse
- #fetch(limit:, queue:) ⇒ Object
-
#initialize(queue_adapter) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(queue_adapter) ⇒ Base
Returns a new instance of Base.
79 80 81 |
# File 'lib/rails_console_pro/services/queue_insight_fetcher.rb', line 79 def initialize(queue_adapter) @queue_adapter = queue_adapter end |
Instance Attribute Details
#queue_adapter ⇒ Object (readonly)
Returns the value of attribute queue_adapter.
77 78 79 |
# File 'lib/rails_console_pro/services/queue_insight_fetcher.rb', line 77 def queue_adapter @queue_adapter end |
Instance Method Details
#fetch(limit:, queue:) ⇒ Object
83 84 85 86 |
# File 'lib/rails_console_pro/services/queue_insight_fetcher.rb', line 83 def fetch(limit:, queue:) payload = gather(limit: limit, queue: queue) build_result(**payload.merge(limit: limit)) end |