Include local file in Ruby

Yes, took me a while to find out i didn’t need “include” or “require” (coming from PHP), and so learned that all i needed was to simply use the File class and its open method…

[code]
f = File.open("inc/some.html");
f.read();
[/code]




No Comments


You can leave the first : )



Leave a Reply

Your email address will not be published. Required fields are marked *