O
Oleg Igor
Why does the method of modules use a dot, and the constants a double
colon?
e.g.
Math:I and Math.cos
colon?
e.g.
Math:I and Math.cos
Why does the method of modules use a dot, and the constants a double
colon?
e.g.
Math:I and Math.cos
You can also use double-colon for invocation:
% ruby -e 'p Math::exp(1)'
2.71828182845905
but that is frowned upon as non-idiomatic ruby.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.