Class: Actor::Address

Inherits:
Struct
  • Object
show all
Defined in:
lib/actor/address.rb,
lib/actor/address.rb

Constant Summary collapse

NoneClass =
Class.new Address
None =
NoneClass.new Stream::Null, 'no-stream'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#streamObject

Returns the value of attribute stream

Returns:

  • (Object)

    the current value of stream



2
3
4
# File 'lib/actor/address.rb', line 2

def stream
  @stream
end

#uuidObject

Returns the value of attribute uuid

Returns:

  • (Object)

    the current value of uuid



2
3
4
# File 'lib/actor/address.rb', line 2

def uuid
  @uuid
end

Class Method Details

.build(stream = nil) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/actor/address.rb', line 3

def self.build stream=nil
  stream ||= Stream.new

  uuid = SecureRandom.uuid

  instance = new stream, uuid
  instance
end