Class: CITA::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/cita/address.rb

Instance Method Summary collapse

Constructor Details

#initialize(str) ⇒ Address



6
7
8
# File 'lib/cita/address.rb', line 6

def initialize(str)
  @addr = Utils.remove_hex_prefix(str)
end

Instance Method Details

#==(other) ⇒ Object

compare address is equal



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

def ==(other)
  addr.casecmp(other.addr)
end

#addrString

get address with 0x prefix



13
14
15
# File 'lib/cita/address.rb', line 13

def addr
  Utils.add_hex_prefix(@addr)
end