In Ruby what is the difference between those two (in code):
Class.method
Class#method
General Usage Rules In America, Canada, Australia and New Zealand, the general rule is that double quotes are used to denote direct speech. Single quotes are used to enclose a quote within a quote, a quote within a headline, or a title within a quote.
Double quotation marks (in British English) are used to indicate direct speech within direct speech (use single inverted commas for direct speech and double quotation marks to enclose quoted material within).
Single quotation marks are also known as 'quote marks', 'quotes', 'speech marks' or 'inverted commas'. Use them to: show direct speech and the quoted work of other writers. enclose the title of certain works.
The use of single and double quotation marks when quoting differs between US and UK English. In US English, you must use double quotation marks. Single quotation marks are used for quotes within quotes.
It's a naming convention.
#method
for instance methods.method
for class methodsSee: How to name RSpec describe blocks for methods
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With