Class: CyberplatPKI::UserIdPacket

Inherits:
Packet
  • Object
show all
Defined in:
lib/cyberplat_pki/user_id_packet.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Packet

save

Constructor Details

#initialize(user_id = nil) ⇒ UserIdPacket

Returns a new instance of UserIdPacket.



5
6
7
# File 'lib/cyberplat_pki/user_id_packet.rb', line 5

def initialize(user_id = nil)
  @user_id = user_id
end

Instance Attribute Details

#user_idObject

Returns the value of attribute user_id.



3
4
5
# File 'lib/cyberplat_pki/user_id_packet.rb', line 3

def user_id
  @user_id
end

Class Method Details

.load(io, context) ⇒ Object



9
10
11
# File 'lib/cyberplat_pki/user_id_packet.rb', line 9

def self.load(io, context)
  new io.read
end

Instance Method Details

#save(io, context) ⇒ Object



13
14
15
# File 'lib/cyberplat_pki/user_id_packet.rb', line 13

def save(io, context)
  io.write @user_id
end