Sha256: e52b7c3c1b2d237cf07c4ef380f25f9bb6b124c698ca2be7627217245bc64d10

Contents?: true

Size: 334 Bytes

Versions: 21

Compression:

Stored size: 334 Bytes

Contents

module RForce
  # Allows indexing hashes like method calls: hash.key
  # to supplement the traditional way of indexing: hash[key]
  module MethodKeys
    def method_missing(method, *args)
      raise NoMethodError unless respond_to?('[]')
      self[method]
    end
  end
  
  class MethodHash < Hash
    include MethodKeys
  end
end

Version data entries

21 entries across 21 versions & 9 rubygems

Version Path
copious-activerecord-activesalesforce-adapter-2.3.1 lib/rforce/method_keys.rb
johnreilly-activerecord-activesalesforce-adapter-2.3.5 lib/rforce/method_keys.rb
sportgenic-activerecord-activesalesforce-adapter-2.3.3 lib/rforce/method_keys.rb
sportgenic-activerecord-activesalesforce-adapter-2.3.4 lib/rforce/method_keys.rb
rforce-0.12 lib/rforce/method_keys.rb
rforce-0.11 lib/rforce/method_keys.rb
rforce-0.10 lib/rforce/method_keys.rb
rforce-0.9 lib/rforce/method_keys.rb
rforce-0.8.1 lib/rforce/method_keys.rb
rforce-0.8 lib/rforce/method_keys.rb
rforce-0.7 lib/rforce/method_keys.rb
rforce-0.6 lib/rforce/method_keys.rb
rforce-0.5.1 lib/rforce/method_keys.rb
aq1018-rforce-0.5.2 lib/rforce/method_keys.rb
aq1018-rforce-0.5.1 lib/rforce/method_keys.rb
DerGuteMoritz-rforce-0.4.2 lib/rforce/method_keys.rb
rforce-raygao-1.0.0 lib/rforce/method_keys.rb
silent-e-activerecord-activesalesforce-adapter-2.3.8.1 lib/rforce/method_keys.rb
althor880-activerecord-activesalesforce-adapter-2.3.7 lib/rforce/method_keys.rb
althor880-activerecord-activesalesforce-adapter-2.3.6 lib/rforce/method_keys.rb