Hello:
I am new to Ruby and experimenting. I have a process broken down
into five individual Ruby programs. I have contained each of the five
within another single Ruby program as follows:
require_relative ‘Step1.rb’
require_relative ‘Step2.rb’
require_relative ‘Step3.rb’
require_relative ‘Step4.rb’
require_relative ‘Step5.rb’
The Step5.rb program which is the last program in the sequence writes
out
a file. It does this perfectly when I execute Step5.rb all by itself
giving me the file and the content I want.
But when I execute the five steps within the containing .rb program, the
Step5.rb program creates the file but has nothing in it.
My question is this, in the containing program [let’s call it Phase1.rb,
do the programs contained execute and complete serially [which is what I
want], or do I have to do something else to make sure each Step is
completed before the next executed?