metaprogramming - Ruby Object Model clarification -


in ruby, can write,

dog = class.new 

so here, dog object instance of class.

also, can write

fido = dog.new 

which possible if dog class.

is dog here class or object?

everything in ruby object (except blocks). , dog here class.

dog = class.new fido = dog.new 

so answer is: both.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -