require "./fileB"
require "minitest/autorun"
fileB.rb has
String SOME_CONSTANT = "test"
class MakeCommandFiles
String BASE_DIR_EXPANDED = File.expand_path(File.dirname(__FILE__));
def makeFirstCommandFile()
end
end
In FileA.rb I could access the constant in fileB.rb by the class name like soMakeCommandFiles::BASE_DIR_EXPANDED
echo "FOO = 'hello'" > b.rb
echo "require_relative 'b'" > a.rb
echo "puts FOO" >> a.rb
ruby a.rb
- Keith
--
You received this message because you are subscribed to the Google Groups "Ruby Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyjam+u...@googlegroups.com.
To post to this group, send email to rub...@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyjam.
For more options, visit https://groups.google.com/d/optout.