Require statement for Lorax?

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

On Friday, August 13, 2010 01:18:21 pm Xeno C. / Eskimo North and
Gmail
wrote:

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs