# Learning newb: regaring methods and class methods

**URL:** <https://www.ruby-forum.com/t/learning-newb-regaring-methods-and-class-methods/98148>\
**Category:** Ruby\
**Created:** [July 12, 2006, 7:28pm UTC](https://www.ruby-forum.com/t/learning-newb-regaring-methods-and-class-methods/98148 "2006-07-12T19:28:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eddiewould](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@eddiewould](https://www.ruby-forum.com/u/eddiewould)\
**Post date:** [July 12, 2006, 7:28pm UTC](https://www.ruby-forum.com/t/learning-newb-regaring-methods-and-class-methods/98148/1 "2006-07-12T19:28:58Z")

</div>

hi, i just need to know if i’m on the right trax regarding ruby:

a ‘::’ method class attached to another constant or variable will tell  
that constant/variable to use all methods under it’s class where

as ‘.’ tells ruby to use only 1 method.

but before using that method, we have to call for the ‘new class’ that  
method belongs to…

Can someone please tell me if any of the above is wrong?

thanks

---

<div class="post-metadata">

**Author:** ![eddiewould](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/b5e925/32.png) [@eddiewould](https://www.ruby-forum.com/u/eddiewould)\
**Post date:** [July 12, 2006, 7:38pm UTC](https://www.ruby-forum.com/t/learning-newb-regaring-methods-and-class-methods/98148/2 "2006-07-12T19:38:00Z")

</div>

Hi –

On Thu, 13 Jul 2006, Dominic S. wrote:

> Can someone please tell me if any of the above is wrong?  
> :: is chiefly for navigating paths through nested classes and modules:

class A  
module B  
class C  
end  
end  
end

A:🅱:C.new # new instance of the inner class

. is for calling methods – like C.new, above.

You’ll sometimes see :: used for calling methods when the receiver is  
a class or module, but personally I think it’s simpler and clearer just  
to use . for calling methods.

David
