require statement for Lorax?

  • Thread starter Xeno Campanoli / Eskimo North and Gmail
  • Start date
X

Xeno Campanoli / Eskimo North and Gmail

I've installed Lorax, and looking around, I realize there is no example of a
require statement. This is generally often left off I notice from docs, and
presumably I can guess, but it seems like that is a good thing to include in
intros to get people using stuff...


xc
 
D

David Masover

I've installed Lorax, and looking around, I realize there is no example of
a require statement. This is generally often left off I notice from docs,
and presumably I can guess, but it seems like that is a good thing to
include in intros to get people using stuff...

Maybe so, but still, when I install a gem, unless I have reason to believe the
require statement will be something else, I assume it's the name of the gem.
In fact, I think Rails/Bundler makes the same assumption:

http://gembundler.com/gemfile.html

"If a gem's main file is different than the gem name, specify how to require
it."

Otherwise, it assumes that when you depend on the gem 'foo', you can require
it by requiring 'foo'.

Also, it may be valuable for newbies to read code, and this is an easy one to
figure out:

http://github.com/flavorjones/lorax/blob/master/lib/lorax.rb
 

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
474,146
Messages
2,570,832
Members
47,374
Latest member
anuragag27

Latest Threads

Top