Class: Gqldb::Row
- Inherits:
-
Object
- Object
- Gqldb::Row
- Defined in:
- lib/tina4_ultipa/pb.rb
Instance Attribute Summary collapse
-
#values ⇒ Object
Returns the value of attribute values.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(values: []) ⇒ Row
constructor
A new instance of Row.
Constructor Details
#initialize(values: []) ⇒ Row
Returns a new instance of Row.
229 230 231 |
# File 'lib/tina4_ultipa/pb.rb', line 229 def initialize(values: []) @values = values end |
Instance Attribute Details
#values ⇒ Object
Returns the value of attribute values.
227 228 229 |
# File 'lib/tina4_ultipa/pb.rb', line 227 def values @values end |
Class Method Details
.decode(bytes) ⇒ Object
233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
# File 'lib/tina4_ultipa/pb.rb', line 233 def self.decode(bytes) o = new r = Reader.new(bytes) until r.eof? tag = r.read_varint fn = tag >> 3 wt = tag & 7 if fn == 1 && wt == 2 o.values << TypedValue.decode(r.read_len) else r.skip(wt) end end o end |