Ruby extension names

I am wondering if Ruby has a way for classifying wether a file has
useful code or if it is a file just containing functions/classes ? (Only
“.rb” ?)

Just like C++ has, “.cpp” (code, function runtime) file and “.h” is
header (functions, classes)

The short answer is no.

Most good ruby programmers however subscribe to the java convention of
one class/mixin per source file. Note that it is not the same as one
file per class/mixin.

It isn’t uncommon to see scripts with no extention while class/mixin
files are almost always .rb

Usually the naming schema’s pretty good. If I see a file called array.rb
I
can expect it to include some code like:

class Array
def some_new_method
#funky code
end
end

On Jan 18, 2008 4:17 AM, Keynan P. [email protected]
wrote:

Posted via http://www.ruby-forum.com/.


Ryan B.

Feel free to add me to MSN and/or GTalk as this email.