Ruby Programming Variable Scope

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

I understand constants need to have all its chars capitalized whereas CamelCase is used to define classes.

pablovent
Автор

they are constants assigned to classes as their names. Anonymous classes can be created with Class.new and assign names later.
Konst = Class.new
i = Konst.new
i.class.to_s #=> "Konst"

toraritte
Автор

i see what you did there

'movies' for #<Adult:0xxx7f8etc

mariozig
join shbcf.ru