Class: Array

Inherits:
Object show all
Defined in:
lib/xarray.rb

Instance Method Summary collapse

Instance Method Details

#each(params = nil) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/xarray.rb', line 12

def each params=nil
	prev = $iter
	old_each do |val|
		$iter = val
		yield val 
	end
	$iter = prev
end

#map(params = nil) ⇒ Object



24
25
26
27
28
29
# File 'lib/xarray.rb', line 24

def map params=nil
	old_map do |val|
		$iter = val
		yield 
	end
end

#old_eachObject



10
# File 'lib/xarray.rb', line 10

alias_method :old_each, :each

#old_mapObject



22
# File 'lib/xarray.rb', line 22

alias_method :old_map, :map

#old_selectObject



32
# File 'lib/xarray.rb', line 32

alias_method :old_select, :select

#select(params = nil) ⇒ Object



34
35
36
37
38
39
# File 'lib/xarray.rb', line 34

def select params=nil
	old_select do |val|
		$iter = val
		yield 
	end
end