Module: Pacer::Core::Route::IteratorContextMixin

Defined in:
lib/pacer/support/iterator_mixins.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#graphObject

Returns the value of attribute graph



21
22
23
# File 'lib/pacer/support/iterator_mixins.rb', line 21

def graph
  @graph
end

Instance Method Details

#context=(context) ⇒ Object

Set the context



24
25
26
# File 'lib/pacer/support/iterator_mixins.rb', line 24

def context=(context)
  @context = context
end

#nextObject



28
29
30
31
32
33
# File 'lib/pacer/support/iterator_mixins.rb', line 28

def next
  item = super
  item.back = @context
  item.graph ||= @graph
  item
end