Class: ReactOnRailsPro::StreamCache::CachedChunksComponent
- Inherits:
-
Object
- Object
- ReactOnRailsPro::StreamCache::CachedChunksComponent
- Defined in:
- lib/react_on_rails_pro/stream_cache.rb
Instance Method Summary collapse
- #each_chunk(&block) ⇒ Object
-
#initialize(chunks) ⇒ CachedChunksComponent
constructor
A new instance of CachedChunksComponent.
Constructor Details
#initialize(chunks) ⇒ CachedChunksComponent
Returns a new instance of CachedChunksComponent.
31 32 33 |
# File 'lib/react_on_rails_pro/stream_cache.rb', line 31 def initialize(chunks) @chunks = chunks end |
Instance Method Details
#each_chunk(&block) ⇒ Object
35 36 37 38 39 |
# File 'lib/react_on_rails_pro/stream_cache.rb', line 35 def each_chunk(&block) return enum_for(:each_chunk) unless block @chunks.each(&block) end |