annotations - Ruby notation conventions -
when writing ruby code use:
dogrepresent dog class#barkrepresent instance method.newor::newrepresent class method
what's convention representing instance of class? dog blend right in surrounding regular text.
that sounds right. in smalltalk, customary use anarray, astring or adog (even parameter names in method declarations), translate an_array, a_string or a_dog. however, that's not customary, , might strange experienced rubyist, expect see ary, str , dog.
note in general, dot only used in code examples actual method calls. when talking about method, always use # , :: instance methods , singleton methods.
Comments
Post a Comment