Module: When::Parts::Resource::Navigation

Defined in:
lib/when_exe/parts/resource.rb

Instance Method Summary collapse

Instance Method Details

#nextWhen::Parts::Resource Also known as: succ

次のオブジェクト



220
221
222
223
224
# File 'lib/when_exe/parts/resource.rb', line 220

def next
  c = self
  c = c.child[0] while c.child && c.child.size > 0
  c._pool['.->']
end

#prevWhen::Parts::Resource

前のオブジェクト



208
209
210
211
212
213
214
# File 'lib/when_exe/parts/resource.rb', line 208

def prev
  c = self
  c = c.child[0] while c.child && c.child.size > 0
  c = c._pool['.<-']
  c = c.child[-1] while c && c.child && c.child.size > 0
  c
end