Class: Thenga

Inherits:
Object
  • Object
show all
Defined in:
lib/thenga.rb

Class Method Summary collapse

Class Method Details

.aloha(a, b, c) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/thenga.rb', line 2

def self.aloha(a,b,c)
    n=2
    a.each_line do |l|
    if n%2==0
       b.write(l)    
    else  
       c.write(l)
    end
    n=n+1
    end
 a.close
 b.close
 c.close
 return true
end