Method: Liste#each

Defined in:
lib/prct06/list.rb

#eachobj.value

Each Method, necessarie for the enumeration

Returns:

  • (obj.value)
    gives back the value of the actual node


27
28
29
30
31
32
33
# File 'lib/prct06/list.rb', line 27

def each()
	act = @head
	while act != nil
		yield act.value
		act = act.next
	end
end