Product Class

Z

Zorigami

[Note: parts of this message were removed to make it a legal post.]

Does anyone out there have a good "Product" Class?(With defs such as
"setprice", "name", and "id"...)
If so than could you send it to me?
I've been trying to make one and Ideas would help.
Thanks,
 
E

Eric Hodel

Does anyone out there have a good "Product" Class?(With defs such as
"setprice", "name", and "id"...)
If so than could you send it to me?
I've been trying to make one and Ideas would help.
Thanks,

class Product < Struct.new:)id, :name, :price)
# custom behavior, if you need it
end
 
Z

Zorigami

[Note: parts of this message were removed to make it a legal post.]

Thanks.
What would be the syntax for making a new "Product", say... called "Dog
Collar".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,736
Latest member
zacharyharris

Latest Threads

Top