Class: Batching::Batch
- Inherits:
-
Array
- Object
- Array
- Batching::Batch
- Defined in:
- lib/batching.rb
Overview
Purpose adds start_index to Array
Instance Attribute Summary collapse
-
#start_index ⇒ Object
Returns the value of attribute start_index.
Instance Method Summary collapse
Instance Attribute Details
#start_index ⇒ Object
Returns the value of attribute start_index.
5 6 7 |
# File 'lib/batching.rb', line 5 def start_index @start_index end |
Instance Method Details
#end_index ⇒ Object
7 8 9 10 11 |
# File 'lib/batching.rb', line 7 def end_index return nil if size.zero? start_index + size - 1 end |