Module: Enumerable

Defined in:
lib/Latin1Prober.rb

Instance Method Summary collapse

Instance Method Details

#reduce(fn, res) ⇒ Object



33
34
35
36
# File 'lib/Latin1Prober.rb', line 33

def reduce(fn, res)
    each { |n| res = res.send(fn, n) }
    res
end

#reduceBlock(res) ⇒ Object



38
39
40
41
# File 'lib/Latin1Prober.rb', line 38

def reduceBlock(res)
    each { |n| res = yield(res, n) }
    res
end