class Erlang::OtpErlangPort

Attributes

creation[R]
id[R]
node[R]

Public Class Methods

new(node, id, creation) click to toggle source
# File lib/erlang.rb, line 203
def initialize(node, id, creation)
    @node = node
    @id = id
    @creation = creation
end

Public Instance Methods

==(other) click to toggle source
# File lib/erlang.rb, line 235
def ==(other)
    return binary == other.binary
end
Also aliased as: eql?
binary() click to toggle source
# File lib/erlang.rb, line 211
def binary
    id_size = @id.bytesize
    if id_size == 8
        return "#{TAG_V4_PORT_EXT.chr}" \
               "#{@node.binary}#{@id}#{@creation}"
    end
    creation_size = @creation.bytesize
    if creation_size == 4
        return "#{TAG_NEW_PORT_EXT.chr}" \
               "#{@node.binary}#{@id}#{@creation}"
    elsif creation_size == 1
        return "#{TAG_PORT_EXT.chr}" \
               "#{@node.binary}#{@id}#{@creation}"
    else
        raise OutputException, 'unknown port type', caller
    end
end
eql?(other)
Alias for: ==
hash() click to toggle source
# File lib/erlang.rb, line 232
def hash
    return binary.hash
end
to_s() click to toggle source
# File lib/erlang.rb, line 228
def to_s
    return "#{self.class.name}" \
           "('#{@node.to_s}','#{@id.to_s}','#{@creation.to_s}')"
end