class IcAgent::Candid::BaseTypes
Public Class Methods
func(args, ret, annotations)
click to toggle source
# File lib/ic_agent/candid.rb, line 1358 def self.func(args, ret, annotations) FuncClass.new(args, ret, annotations) end
method_missing(method_name)
click to toggle source
# File lib/ic_agent/candid.rb, line 1291 def self.method_missing(method_name) case method_name.to_s when 'null' return NullClass.new when 'empty' return EmptyClass.new when 'bool' return BoolClass.new when 'int' return IntClass.new when 'reserved' return ReservedClass.new when 'nat' return NatClass.new when 'text' return TextClass.new when 'principal' return PrincipalClass.new when 'float32' return FloatClass.new(32) when 'float64' return FloatClass.new(64) when 'int8' return FixedIntClass.new(8) when 'int16' return FixedIntClass.new(16) when 'int32' return FixedIntClass.new(32) when 'int64' return FixedIntClass.new(64) when 'nat8' return FixedNatClass.new(8) when 'nat16' return FixedNatClass.new(16) when 'nat32' return FixedNatClass.new(32) when 'nat64' return FixedNatClass.new(64) else puts "Method #{method_name} is not defined" end end
opt(t)
click to toggle source
# File lib/ic_agent/candid.rb, line 1342 def self.opt(t) OptClass.new(t) end
rec()
click to toggle source
# File lib/ic_agent/candid.rb, line 1354 def self.rec RecClass.new end
record(t)
click to toggle source
# File lib/ic_agent/candid.rb, line 1346 def self.record(t) RecordClass.new(t) end
service(t)
click to toggle source
# File lib/ic_agent/candid.rb, line 1362 def self.service(t) ServiceClass.new(t) end
tuple(*types)
click to toggle source
# File lib/ic_agent/candid.rb, line 1334 def self.tuple(*types) TupleClass.new(*types) end
variant(fields)
click to toggle source
# File lib/ic_agent/candid.rb, line 1350 def self.variant(fields) VariantClass.new(fields) end
vec(t)
click to toggle source
# File lib/ic_agent/candid.rb, line 1338 def self.vec(t) VecClass.new(t) end