Class names in arrays

B

Benjamin Fowl

Is it a bad idea to use class names in a hash?

eg

coll = [EcoCalendar,MarketForecast]
 
J

Jesús Gabriel y Galán

Is it a bad idea to use class names in a hash?

eg

coll = [EcoCalendar,MarketForecast]

Not per se, depends on what you are going to do with them. By the way,
that's not a hash, it's an array:

ruby-1.8.7-p334 :001 > [String,Time].class
=> Array

Can you give us more information?

Jesus.
 
W

Waldemar Dick

Hi,

Am 24.03.2011 11:22, schrieb Benjamin Fowl:
Is it a bad idea to use class names in a hash?

eg

coll = [EcoCalendar,MarketForecast]

generally speaking, there is no correct answer for that question. It
depends on your context.
If it fits yours solution, it's absolutely ok.

Waldemar
 
R

Robert Klemme

Is it a bad idea to use class names in a hash?

eg

coll = [EcoCalendar,MarketForecast]

Where's the Hash? Or did you mean [EcoCalendar,MarketForecast].hash ?

Cheers

robert
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top