class IcAgent::Candid::NatClass
Represents an IDL Nat
Public Class Methods
new()
click to toggle source
Calls superclass method
IcAgent::Candid::PrimitiveType::new
# File lib/ic_agent/candid.rb, line 386 def initialize super end
Public Instance Methods
covariant(x)
click to toggle source
# File lib/ic_agent/candid.rb, line 390 def covariant(x) x.is_a?(Integer) && x >= 0 end
decode_value(pipe, t)
click to toggle source
# File lib/ic_agent/candid.rb, line 402 def decode_value(pipe, t) check_type(t) IcAgent::Candid.leb128u_decode(pipe) end
encode_type(type_table = nil)
click to toggle source
# File lib/ic_agent/candid.rb, line 398 def encode_type(type_table = nil) LEB128.encode_signed(TypeIds::Nat).string end
encode_value(val)
click to toggle source
# File lib/ic_agent/candid.rb, line 394 def encode_value(val) LEB128.encode_signed(val).string end
id()
click to toggle source
# File lib/ic_agent/candid.rb, line 411 def id TypeIds::Nat end
name()
click to toggle source
# File lib/ic_agent/candid.rb, line 407 def name 'nat' end