Class: JCW::Interceptors::Gruf::Hpack
- Inherits:
-
Object
- Object
- JCW::Interceptors::Gruf::Hpack
- Defined in:
- lib/jcw/interceptors/gruf/hpack.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
- #each(&block) ⇒ Object
-
#initialize(wrapped) ⇒ Hpack
constructor
A new instance of Hpack.
Constructor Details
#initialize(wrapped) ⇒ Hpack
Returns a new instance of Hpack.
7 8 9 |
# File 'lib/jcw/interceptors/gruf/hpack.rb', line 7 def initialize(wrapped) @wrapped = wrapped end |
Instance Method Details
#[](key) ⇒ Object
11 12 13 |
# File 'lib/jcw/interceptors/gruf/hpack.rb', line 11 def [](key) @wrapped[key.downcase] end |
#[]=(key, value) ⇒ Object
15 16 17 18 19 |
# File 'lib/jcw/interceptors/gruf/hpack.rb', line 15 def []=(key, value) return unless value @wrapped[key.downcase] = value end |
#each(&block) ⇒ Object
21 22 23 |
# File 'lib/jcw/interceptors/gruf/hpack.rb', line 21 def each(&block) @wrapped.each(&block) end |