class IcAgent::Candid::ConstructType
Public Class Methods
new()
click to toggle source
Calls superclass method
# File lib/ic_agent/candid.rb, line 155 def initialize super end
Public Instance Methods
check_type(t)
click to toggle source
# File lib/ic_agent/candid.rb, line 159 def check_type(t) if t.is_a?(RecClass) ty = t.get_type() if ty == nil raise ValueError, 'type mismatch with uninitialized type' end return ty else raise ValueError, "type mismatch: type on the wire #{t.name}, expect type #{self.name}" end end
encode_type(type_table)
click to toggle source
# File lib/ic_agent/candid.rb, line 172 def encode_type(type_table) return type_table.index_of(self.name) end