Class: Nanite::FileStart

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

Overview

packet that means start 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(filename, dest, token) ⇒ FileStart

Returns a new instance of FileStart.



20
21
22
23
24
# File 'lib/nanite/packets.rb', line 20

def initialize(filename, dest, token)
  @filename = filename
  @dest = dest
  @token = token
end

Instance Attribute Details

#destObject

Returns the value of attribute dest.



19
20
21
# File 'lib/nanite/packets.rb', line 19

def dest
  @dest
end

#filenameObject

Returns the value of attribute filename.



19
20
21
# File 'lib/nanite/packets.rb', line 19

def filename
  @filename
end

#tokenObject

Returns the value of attribute token.



19
20
21
# File 'lib/nanite/packets.rb', line 19

def token
  @token
end

Class Method Details

.json_create(o) ⇒ Object



26
27
28
29
# File 'lib/nanite/packets.rb', line 26

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