What are the various meanings of the Ruby sharp/number sign/pound/hash(#) symbol
How many contexts does the symbol #
in Ruby have ?
I know that #` represents comment
# a comment
or 'convert to the value':
i = 1 print "#{i}" # simple example
However I also see some Ruby docs describe built-in methods like these:
Array#fill File::file?
Why do they describe the same thing using 2 different symbols ? I am new in Ruby. Thanks
English has two articles: the and a/an. The is used to refer to specific or particular nouns; a/an is used to modify non-specific or non-particular nouns. We call the the definite article and a/an the indefinite article. the = definite article.
It was the language spoken by the Anglo-Saxon people under many dialects from about 500 to about 1100 when the Norman invasion began the transformation to Middle English. Depending on case and number, it has such meanings as: the; that; that one; who; which; that which; this; he; she, them, those, etc.
The is used to describe a specific noun, whereas a/an is used to describe a more general noun. For this reason, the is also referred to as a definite article, and a/an is referred to as an indefinite article. The definite article, the, is used before both singular and plural nouns when the noun is specific.
They tell if the noun is general or specific. When an article is specific, it is called a definite article. The word 'the' is a definite article. English speakers use 'the' when both the speaker and the listener know what is being referred to.
This is how instance method described:
Array#fill
So you can:
a = Array.new(2) => [nil, nil] a.fill(42) => [42, 42]
This is how class method described:
String::new s = String.new('abc') => "abc"
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