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

php - cannot display multiple markers in google maps v3 from traceroute result -

php - Boolean search on database with 5 million rows, very slow -

css - Text drops down with smaller window -