Class: Bits::JoinBackend
- Includes:
- Logging
- Defined in:
- lib/bits/backend/join.rb
Instance Method Summary collapse
-
#fetch(atom) ⇒ Object
no need to fetch.
-
#initialize(backends) ⇒ JoinBackend
constructor
A new instance of JoinBackend.
Methods included from Logging
Constructor Details
#initialize(backends) ⇒ JoinBackend
Returns a new instance of JoinBackend.
9 10 11 |
# File 'lib/bits/backend/join.rb', line 9 def initialize(backends) @backends = backends end |
Instance Method Details
#fetch(atom) ⇒ Object
no need to fetch
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/bits/backend/join.rb', line 14 def fetch(atom) @backends.each do |backend| begin return backend.fetch atom rescue MissingBit next end end raise MissingBit.new atom end |