Class: When::Parts::Resource::Enumerator

Inherits:
Enumerator
  • Object
show all
Defined in:
lib/when_exe/parts/resource.rb

Overview

オブジェクトを順に取り出す enumerator

Instance Attribute Summary

Attributes inherited from Enumerator

#count, #count_limit, #current, #direction, #exdate, #first, #index, #last, #object, #options, #parent, #processed

Instance Method Summary collapse

Methods inherited from Enumerator

_options, #_rewind, #each, #has_next?, #initialize, #next, #with_index, #with_object

Constructor Details

This class inherits a constructor from When::Parts::Enumerator

Instance Method Details

#succWhen::Parts::Resource

次のオブジェクトを取り出す



936
937
938
939
940
941
# File 'lib/when_exe/parts/resource.rb', line 936

def succ
  value = @current
  @current = (@current==:first) ? @first : ((@direction == :reverse) ? @current.prev : @current.next)
  @current = nil unless @first.leaf? || @first.include?(@current)
  return value
end