Sha256: 1fd153faa160699507b085b78f40c2ca5d82635deb5cb8b7a12aa5240c77851c

Contents?: true

Size: 421 Bytes

Versions: 5

Compression:

Stored size: 421 Bytes

Contents

class Request

  # A string with cashed #hash for faster hash access
  class Key < ::String

    # Return hash
    #
    # @return [Fixnum]
    #
    # @api private
    #
    attr_reader :hash

    # Initialize object
    #
    # @param [String] string
    #
    # @return [undefined]
    #
    # @api private
    #
    def initialize(string)
      @hash = string.hash
      super(string)
      freeze
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
request-0.0.6 lib/request/key.rb
request-0.0.5 lib/request/key.rb
request-0.0.4 lib/request/key.rb
request-0.0.3 lib/request/key.rb
request-0.0.2 lib/request/key.rb