Class: Nanite::FileEnd
Overview
packet that means end of a file transfer operation
Instance Attribute Summary collapse
-
#meta ⇒ Object
Returns the value of attribute meta.
-
#token ⇒ Object
Returns the value of attribute token.
Attributes inherited from Packet
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(token, meta, size = nil) ⇒ FileEnd
constructor
A new instance of FileEnd.
- #to_s ⇒ Object
Methods inherited from Packet
Constructor Details
#initialize(token, meta, size = nil) ⇒ FileEnd
Returns a new instance of FileEnd.
71 72 73 74 75 |
# File 'lib/nanite/packets.rb', line 71 def initialize(token, , size=nil) @token = token @meta = @size = size end |
Instance Attribute Details
#meta ⇒ Object
Returns the value of attribute meta.
69 70 71 |
# File 'lib/nanite/packets.rb', line 69 def @meta end |
#token ⇒ Object
Returns the value of attribute token.
69 70 71 |
# File 'lib/nanite/packets.rb', line 69 def token @token end |
Class Method Details
.json_create(o) ⇒ Object
77 78 79 80 |
# File 'lib/nanite/packets.rb', line 77 def self.json_create(o) i = o['data'] new(i['token'], i['meta'], o['size']) end |
Instance Method Details
#to_s ⇒ Object
82 83 84 |
# File 'lib/nanite/packets.rb', line 82 def to_s "#{super} <#{token}> meta #{}" end |