Class: Nanite::FileEnd

Inherits:
Packet show all
Defined in:
lib/nanite/packets.rb

Overview

packet that means end of a file transfer operation

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Packet

#to_json

Constructor Details

#initialize(token, meta) ⇒ FileEnd

Returns a new instance of FileEnd.



36
37
38
39
# File 'lib/nanite/packets.rb', line 36

def initialize(token, meta)
  @token = token
  @meta  = meta
end

Instance Attribute Details

#metaObject

Returns the value of attribute meta.



35
36
37
# File 'lib/nanite/packets.rb', line 35

def meta
  @meta
end

#tokenObject

Returns the value of attribute token.



35
36
37
# File 'lib/nanite/packets.rb', line 35

def token
  @token
end

Class Method Details

.json_create(o) ⇒ Object



41
42
43
44
# File 'lib/nanite/packets.rb', line 41

def self.json_create(o)
  i = o['data']
  new(i['token'], i['meta'])
end