Class: IcAgent::Candid::IntClass
Instance Method Summary
collapse
#_build_type_table_impl, #check_type
Methods inherited from BaseType
_build_type_table_impl, #build_type_table, check_type, covariant, decode_value, #display, encode_type, encode_value
Constructor Details
Returns a new instance of IntClass.
347
348
349
|
# File 'lib/ic_agent/candid.rb', line 347
def initialize
super
end
|
Instance Method Details
#covariant(x) ⇒ Object
351
352
353
|
# File 'lib/ic_agent/candid.rb', line 351
def covariant(x)
x.is_a?(Integer)
end
|
#decode_value(b, t) ⇒ Object
#encode_type(type_table = nil) ⇒ Object
359
360
361
|
# File 'lib/ic_agent/candid.rb', line 359
def encode_type(type_table = nil)
LEB128.encode_signed(TypeIds::Int).string
end
|
#encode_value(val) ⇒ Object
355
356
357
|
# File 'lib/ic_agent/candid.rb', line 355
def encode_value(val)
LEB128.encode_signed(val).string
end
|
#id ⇒ Object
372
373
374
|
# File 'lib/ic_agent/candid.rb', line 372
def id
TypeIds::Int
end
|
#name ⇒ Object
368
369
370
|
# File 'lib/ic_agent/candid.rb', line 368
def name
'int'
end
|