Class: IcAgent::Candid::IntClass
Overview
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.
354
355
356
|
# File 'lib/ic_agent/candid.rb', line 354
def initialize
super
end
|
Instance Method Details
#covariant(x) ⇒ Object
358
359
360
|
# File 'lib/ic_agent/candid.rb', line 358
def covariant(x)
x.is_a?(Integer)
end
|
#decode_value(b, t) ⇒ Object
#encode_type(type_table = nil) ⇒ Object
366
367
368
|
# File 'lib/ic_agent/candid.rb', line 366
def encode_type(type_table = nil)
LEB128.encode_signed(TypeIds::Int).string
end
|
#encode_value(val) ⇒ Object
362
363
364
|
# File 'lib/ic_agent/candid.rb', line 362
def encode_value(val)
LEB128.encode_signed(val).string
end
|
#id ⇒ Object
379
380
381
|
# File 'lib/ic_agent/candid.rb', line 379
def id
TypeIds::Int
end
|
#name ⇒ Object
375
376
377
|
# File 'lib/ic_agent/candid.rb', line 375
def name
'int'
end
|