Class: Async::Bus::Protocol::Release

Inherits:
Object
  • Object
show all
Defined in:
lib/async/bus/protocol/release.rb

Overview

Represents a named object that has been released (no longer available).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Release

Initialize a new release message.



13
14
15
# File 'lib/async/bus/protocol/release.rb', line 13

def initialize(name)
	@name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



18
19
20
# File 'lib/async/bus/protocol/release.rb', line 18

def name
  @name
end

Class Method Details

.unpack(unpacker) ⇒ Object

Unpack a release from a MessagePack unpacker.



29
30
31
32
33
# File 'lib/async/bus/protocol/release.rb', line 29

def self.unpack(unpacker)
	name = unpacker.read
	
	return self.new(name)
end

Instance Method Details

#pack(packer) ⇒ Object

Pack the release into a MessagePack packer.



22
23
24
# File 'lib/async/bus/protocol/release.rb', line 22

def pack(packer)
	packer.write(@name)
end

#The name of the released object.=(nameofthereleasedobject. = (value)) ⇒ Object



18
# File 'lib/async/bus/protocol/release.rb', line 18

attr :name