Add train.rb method