S
Stefan Codrescu
[Note: parts of this message were removed to make it a legal post.]
Ok so...
Ok... so I have file1 and it contains a number
and I want file2 to tell me what that number is
file2 would be something like
class Tell
def get_num(file = "file1.txt")
num = contents of file1
$num = num
end
def tell_num
puts "The number in file1 is #{$num}."
end
end
What do I put instead of "contents of file1"
Or some completely new code that does the same thing.
Ok so...
Ok... so I have file1 and it contains a number
and I want file2 to tell me what that number is
file2 would be something like
class Tell
def get_num(file = "file1.txt")
num = contents of file1
$num = num
end
def tell_num
puts "The number in file1 is #{$num}."
end
end
What do I put instead of "contents of file1"
Or some completely new code that does the same thing.