Class: LiquidXlsx::StreamingContext::Collection
- Inherits:
-
Object
- Object
- LiquidXlsx::StreamingContext::Collection
- Defined in:
- lib/liquid_xlsx/streaming_context.rb
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(source) ⇒ Collection
constructor
A new instance of Collection.
- #size ⇒ Object
- #to_liquid ⇒ Object
Constructor Details
#initialize(source) ⇒ Collection
Returns a new instance of Collection.
8 9 10 |
# File 'lib/liquid_xlsx/streaming_context.rb', line 8 def initialize(source) @source = source end |
Instance Method Details
#each ⇒ Object
16 17 18 |
# File 'lib/liquid_xlsx/streaming_context.rb', line 16 def each(&) @source.each(&) end |
#size ⇒ Object
20 21 22 |
# File 'lib/liquid_xlsx/streaming_context.rb', line 20 def size @source.size if @source.respond_to?(:size) end |
#to_liquid ⇒ Object
12 13 14 |
# File 'lib/liquid_xlsx/streaming_context.rb', line 12 def to_liquid self end |