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,
Thanks.
What would be the syntax for making a new “Product”, say… called “Dog
Collar”.
On Jun 21, 2009, at 14:35, Zorigami [email protected] wrote:
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
On Jun 21, 2009, at 15:54, Zorigami [email protected] wrote:
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
Do your own homework: ri Struct