Re: Is there a library/mechanism for an object/hash hybrid?




On Mar 30, 2007, at 4:15 PM, Jan Friedrich wrote:

Gary Wright schrieb:
OpenStruct doesn't define access via the indexing method:

info = OpenStruct.new

info.name = 'Gary'
info[:name] # undefined method
It's Ruby, define it. :)

Of course. I was just pointing out that OpenStruct didn't
actually provide the features that the OP had asked for.

You can always roll your own.


Gary Wright




.



Relevant Pages

  • Re: Good cross-platform IDE / multiple document text editor for ruby / rails?
    ... a Ruby IDE and implement this first. ... 1/ imo competing with all editors features doesn't seem to be doable in a long run. ... 2/ after having a decent editor I think that the Ruby related features will bring the users. ... I hope and my estimations are that after the point where Ruby gets more accepted there will be a real need for a good IDE. ...
    (comp.lang.ruby)
  • Re: Large Ruby Apps ?
    ... Power industry and more recently in telecommunications. ... quicker and easier to reimplement them in Ruby, ... the process than to just add the new features in the original languages. ... Rick Nooner ...
    (comp.lang.ruby)
  • Re: [ANN] Ruby Changes in Leopard
    ... packages' development has complete missed one of the main features of ... crippled versions of Ruby. ... what you really need to do is say, some of our users are open source ... you need to make a fundamental distinction between features you ...
    (comp.lang.ruby)
  • Re: eventmachine and rev
    ... A lot of the features that allow Rev to ... implement these features in Ruby 1.8 (which is how EventMachine solved the ... EventMachine namespace, which is a Module that exposes singleton methods ... high-performance cross-platform event monitoring has already undergone a lot ...
    (comp.lang.ruby)
  • Re: Allowing non-ASCII identifiers
    ... Why would that be a catastrophy? ... features and not stop to think about the consequences. ... Isn't Python still the "only one ... If you were suggesting this for Perl or Ruby, I'd be all in favour (in fact, ...
    (comp.lang.python)