What's the scope of a variable in a piece of code that has been require
'd?
e.g. say I have a piece of code like this in a file called users.rb
:
users = ...
and this line is not in a class or in a method. I then require
this file. E.g. in app.rb
require './users.rb'
What's the scope of that variable (users
) and how would I access it?