Sha256: 0ff2a3a6d5243cb9b1b18d2ce23a080814c1f98295086a5eded8ec4b53a5f4c7
Contents?: true
Size: 629 Bytes
Versions: 4
Compression:
Stored size: 629 Bytes
Contents
# frozen_string_literal: true module Totoro class Config def initialize(prefix = nil) @data = Rails.application.config_for(:totoro).with_indifferent_access @data = @data[prefix] if prefix.present? end def reset_data @data = nil end def connect @data[:connect] end def exchange(id) @data[:exchange][id][:name] end def exchange_name_for_queue(queue_id) @data[:queue][queue_id][:exchange] end def queue(id) name = @data[:queue][id][:name] settings = { durable: @data[:queue][id][:durable] } [name, settings] end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
totoro-1.0.3 | lib/totoro/config.rb |
totoro-1.0.2 | lib/totoro/config.rb |
totoro-1.0.1 | lib/totoro/config.rb |
totoro-1.0.0 | lib/totoro/config.rb |