Class: JCW::Interceptors::Gruf::Hpack

Inherits:
Object
  • Object
show all
Defined in:
lib/jcw/interceptors/gruf/hpack.rb

Instance Method Summary collapse

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