RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

Comments

Good article, but it’s a Ruby idiom to write constants in UPPERCASE.

@Anonymous Coward No, the ruby idiom is to write constants in CamelCase. Or do you write ARRAY, HASH, OBJECT etc.? (or do you think those three weren’t constants?)

I would say it is idiomatic to write (constants representing) classes and modules in CamelCase and constant values in UPPERCASE (e.g. PI).

Here’s a favorite of mine:

a = “hello” [*a].each {|w| puts w }

a = [“hello”, “, world”] [*a].each {|w| puts w }

hey, the link’s down…pls

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in