Class: Accessory::TraversalPosition::EnumerableAtOffset

Inherits:
Object
  • Object
show all
Defined in:
lib/accessory/traversal_position/enumerable_at_offset.rb

Overview

Represents an element encountered during #each traversal of an Enumerable.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#elem_atObject (readonly)



21
22
23
# File 'lib/accessory/traversal_position/enumerable_at_offset.rb', line 21

def elem_at
  @elem_at
end

#offsetInteger (readonly)



18
19
20
# File 'lib/accessory/traversal_position/enumerable_at_offset.rb', line 18

def offset
  @offset
end

Instance Method Details

#first?Boolean



24
# File 'lib/accessory/traversal_position/enumerable_at_offset.rb', line 24

def first?; @is_first; end

#last?Boolean



27
# File 'lib/accessory/traversal_position/enumerable_at_offset.rb', line 27

def last?; @is_last; end