Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialRyan Dsouza
9,388 PointsWhats the difference between :: and . in Ruby apart from namespace
Guys.. This is really puzzling and if you could shed some light, it would be awesome..
See this code from ruby docs
File.open("file.rb") if File::exists?( "file.rb" )
Over here, we use 2 different types of calls.
ClassName<dot_operator>method_name and ClassName<name_space_operator>method_name.
Why dont we use use a dot operator in both cases and why cant I use File.exists?("file_name")