Class: Stark::Rack::VerboseProtocol

Inherits:
Thrift::BinaryProtocol
  • Object
show all
Defined in:
lib/stark/rack/verbose_protocol.rb

Overview

Slightly more verbose protocol so that we can get struct and field names included.

Instance Method Summary collapse

Instance Method Details

#read_field_beginObject



23
24
25
26
27
28
# File 'lib/stark/rack/verbose_protocol.rb', line 23

def read_field_begin
  name = read_string
  result = super
  result[0] = name unless name.empty?
  result
end

#read_struct_beginObject



9
10
11
# File 'lib/stark/rack/verbose_protocol.rb', line 9

def read_struct_begin
  read_string
end

#write_field_begin(name, type, id) ⇒ Object



13
14
15
16
# File 'lib/stark/rack/verbose_protocol.rb', line 13

def write_field_begin(name, type, id)
  write_string name
  super
end

#write_field_stopObject



18
19
20
21
# File 'lib/stark/rack/verbose_protocol.rb', line 18

def write_field_stop
  write_string ""
  super
end

#write_struct_begin(name) ⇒ Object



5
6
7
# File 'lib/stark/rack/verbose_protocol.rb', line 5

def write_struct_begin(name)
  write_string name
end