Class: Bones::RPC::Adapter::Parser
- Inherits:
-
Object
- Object
- Bones::RPC::Adapter::Parser
- Defined in:
- lib/bones/rpc/adapter/parser.rb
Instance Attribute Summary collapse
-
#adaper ⇒ Object
readonly
Returns the value of attribute adaper.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
-
#initialize(adapter, data) ⇒ Parser
constructor
A new instance of Parser.
- #packer ⇒ Object
- #read ⇒ Object
- #unpacker ⇒ Object
- #unpacker_pos ⇒ Object
- #unpacker_seek(n) ⇒ Object
Constructor Details
Instance Attribute Details
#adaper ⇒ Object (readonly)
Returns the value of attribute adaper.
7 8 9 |
# File 'lib/bones/rpc/adapter/parser.rb', line 7 def adaper @adaper end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
7 8 9 |
# File 'lib/bones/rpc/adapter/parser.rb', line 7 def data @data end |
Instance Method Details
#packer ⇒ Object
14 15 16 |
# File 'lib/bones/rpc/adapter/parser.rb', line 14 def packer @packer ||= @adapter.packer(data) end |
#read ⇒ Object
18 19 20 |
# File 'lib/bones/rpc/adapter/parser.rb', line 18 def read unpacker.read end |
#unpacker ⇒ Object
26 27 28 |
# File 'lib/bones/rpc/adapter/parser.rb', line 26 def unpacker @unpacker ||= @adapter.unpacker(data) end |
#unpacker_pos ⇒ Object
30 31 32 |
# File 'lib/bones/rpc/adapter/parser.rb', line 30 def unpacker_pos @adapter.unpacker_pos(self) end |
#unpacker_seek(n) ⇒ Object
22 23 24 |
# File 'lib/bones/rpc/adapter/parser.rb', line 22 def unpacker_seek(n) @adapter.unpacker_seek(self, n) end |