Supposing there's the following key-value:

    hash = {
      @bob: 42,
      @joe: 1,
      @tom: 16,
      @luc: 872,
      @mike: 32,
      ...
    }

And we would like to transform those string such as:

    transform("Hello @bob!")
    # => ["Hello ", 42, "!"]
    transform("Today @bob and @mike are coding.")
    # => ["Today ", 42, " and ", 32, " are coding."]
    transform("Hello world.")
    # => ["Hello world."]
    transform("@tom? TOMCAST! HAHAHA")
    # => [16, " TOMCAST! HAHAHA"]

A method such as this transform() one seems not very hard to implement.
But according to you, want could be the more sexy way to process?  With
Ruby 1.9.2 (or 1.9.3).

Thanks.

-- 
Posted via http://www.ruby-forum.com/.