Sha256: 9b5832b11224d0bf462354c7a3b4af6019ab93dc8348b601eaf4f8d4e36920b4

Contents?: true

Size: 262 Bytes

Versions: 4

Compression:

Stored size: 262 Bytes

Contents

module Rupture
  module Lookup
    def lookup
      lambda do |a|
        a[self]
      end
    end
  end
end

class Symbol
  include Rupture::Lookup

  alias ~ lookup
end

class String
  include Rupture::Lookup
end

class Numeric
  include Rupture::Lookup
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rupture-0.3.0 lib/rupture/lookup.rb
rupture-0.2.1 lib/rupture/lookup.rb
rupture-0.2.0 lib/rupture/lookup.rb
rupture-0.1.0 lib/rupture/lookup.rb