Sha256: 009bf30552d2096c536a8bb246a5b773e979346b486bebf6d00da74701db79b9

Contents?: true

Size: 314 Bytes

Versions: 11

Compression:

Stored size: 314 Bytes

Contents

class TweetStream::Hash < ::Hash #:nodoc: all
  def initialize(other_hash = {})
    other_hash.keys.each do |key|
      self[key.to_sym] = other_hash[key]
    end
  end
  
  def method_missing(method_name, *args)
    if key?(method_name.to_sym)
      self[method_name.to_sym]
    else
      super
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
intridea-tweetstream-0.1.3 lib/tweetstream/hash.rb
intridea-tweetstream-0.1.4 lib/tweetstream/hash.rb
intridea-tweetstream-0.1.5 lib/tweetstream/hash.rb
tweetstream-0.3.0 lib/tweetstream/hash.rb
tweetstream-0.1.9 lib/tweetstream/hash.rb
tweetstream-0.1.8 lib/tweetstream/hash.rb
tweetstream-0.1.7 lib/tweetstream/hash.rb
tweetstream-0.1.5 lib/tweetstream/hash.rb
tweetstream-0.1.4 lib/tweetstream/hash.rb
tweetstream-0.1.3 lib/tweetstream/hash.rb
tweetstream-0.1.2 lib/tweetstream/hash.rb