Class: Request::Key
- Inherits:
-
String
- Object
- String
- Request::Key
- Defined in:
- lib/request/key.rb
Overview
A string with cashed #hash for faster hash access
Instance Attribute Summary collapse
-
#hash ⇒ Fixnum
readonly
private
Return hash.
Instance Method Summary collapse
-
#initialize(string) ⇒ undefined
constructor
private
Initialize object.
Constructor Details
#initialize(string) ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialize object
22 23 24 25 26 |
# File 'lib/request/key.rb', line 22 def initialize(string) @hash = string.hash super(string) freeze end |
Instance Attribute Details
#hash ⇒ Fixnum (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Return hash
12 13 14 |
# File 'lib/request/key.rb', line 12 def hash @hash end |