Class: SPDY::Protocol::Control::Settings

Inherits:
BinData::Record
  • Object
show all
Defined in:
lib/spdy/protocol.rb

Instance Method Summary collapse

Instance Method Details

#create(opts = {}) ⇒ Object



143
144
145
146
147
148
149
150
# File 'lib/spdy/protocol.rb', line 143

def create(opts = {})
  opts.each do |k, v|
    key = SPDY::Protocol.const_get(k.to_s.upcase)
    self.headers << { :id_data =>  key , :value_data => v }
  end
  self.pairs = opts.size
  self
end

#parse(chunk) ⇒ Object



138
139
140
141
# File 'lib/spdy/protocol.rb', line 138

def parse(chunk)
  self.read(chunk)
  self
end