class EthereumContractABI::ContractInterface::AbiTypes::Uint
Public Class Methods
from_string(string_type)
click to toggle source
# File lib/ethereum-contract-abi/contract/abi_types/uint.rb, line 22 def self.from_string(string_type) /(?<is_uint>uint)(?<bits>\d+)?/ =~ string_type return nil unless is_uint bits ? self.new(bits.to_i) : self.new end
Public Instance Methods
is_dynamic()
click to toggle source
# File lib/ethereum-contract-abi/contract/abi_types/uint.rb, line 14 def is_dynamic false end
to_s()
click to toggle source
# File lib/ethereum-contract-abi/contract/abi_types/uint.rb, line 10 def to_s "uint#{@bits}" end
valid_value?(number)
click to toggle source
Calls superclass method
EthereumContractABI::ContractInterface::AbiTypes::Int#valid_value?
# File lib/ethereum-contract-abi/contract/abi_types/uint.rb, line 18 def valid_value?(number) super(number) && number >= 0 end