how to include files in ruby webs?

E

Edward

What is the equivalent of
include("library.php");
in ruby?

I googled this and "rendering shared partials in ruby" but can't find
anything.

Thanks,

Edward Tanguay
All my projects: http://www.tanguay.info
 
C

Chris Gehlker

What is the equivalent of
include("library.php");
in ruby?

Well, I don't know php but 'require' is the equivalent of #include in
C/C++ except that it automatically adds the guards against multiple
inclusion. You can also leave off the .rb

Just use it like;
require libfile


HTH
--
For blocks are better cleft with wedges,
Than tools of sharp or subtle edges,
And dullest nonsense has been found
By some to be the most profound.
-Samuel Butler,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top