0

This might be a trivial question, but I've searched and found nothing about it. I'm trying to make a complex application on ruby and I have my classes on different .rb files which the "Main" class requires. As it's written in the code:

require 'Book.rb'
require 'Person.rb'

These files that contains the classes are in the same directory, so what I'm looking for is a Batch command which allows me to include these files, like the one for one file but extended:

ruby Main.rb

Which, of course fails saying that it can't find 'Book.rb' (returns error and doesn't look for the other)

Thank you for your help.

Gabriel
  • 194
  • 1
  • 8

1 Answers1

0

Thanks to the user Abhi y found this post. The command that worked for me was:

irb -I . -r Main.rb

From which you can get further information on the link.

Community
  • 1
  • 1
Gabriel
  • 194
  • 1
  • 8