Class: Tox::Address

Inherits:
Binary show all
Defined in:
lib/tox/address.rb

Overview

Address primitive.

Instance Attribute Summary

Attributes inherited from Binary

#value

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Binary

#==, hex_re, #hex_value=, #initialize, #inspect, #to_s

Constructor Details

This class inherits a constructor from Tox::Binary

Class Method Details

.bytesizeObject



8
9
10
# File 'lib/tox/address.rb', line 8

def self.bytesize
  38
end

Instance Method Details

#checksumObject



20
21
22
# File 'lib/tox/address.rb', line 20

def checksum
  @checksum ||= AddressChecksum.new value[36...38]
end

#nospamObject



16
17
18
# File 'lib/tox/address.rb', line 16

def nospam
  @nospam ||= Nospam.new value[32...36]
end

#public_keyObject



12
13
14
# File 'lib/tox/address.rb', line 12

def public_key
  @public_key ||= PublicKey.new value[0...32]
end