>From  http://www.rubycentral.com/pickaxe/language.html

Constants defined within a class or module may be accessed unadorned 
anywhere within the class or module.

Outside the class or module, they may be accessed using the scope 
operator, ``::'' prefixed by an expression that returns the appropriate 
class or module object. Like:

class Const
  def getConst
    CONST
  end
  CONST = OUTER_CONST + 1
end

Const.new.getConst     »     100
Const::CONST   »   100
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to