Class: IcAgent::Candid::BaseType

Inherits:
Object
  • Object
show all
Defined in:
lib/ic_agent/candid.rb

Overview

Represents an IDL type.

Direct Known Subclasses

ConstructType, PrimitiveType

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

._build_type_table_impl(type_table = nil) ⇒ Object

Raises:

  • (NotImplementedError)


130
131
132
# File 'lib/ic_agent/candid.rb', line 130

def self._build_type_table_impl(type_table = nil)
  raise NotImplementedError, 'subclass must implement abstract method'
end

.check_typeObject

Raises:

  • (NotImplementedError)


126
127
128
# File 'lib/ic_agent/candid.rb', line 126

def self.check_type
  raise NotImplementedError, 'subclass must implement abstract method'
end

.covariantObject

Raises:

  • (NotImplementedError)


110
111
112
# File 'lib/ic_agent/candid.rb', line 110

def self.covariant
  raise NotImplementedError, 'subclass must implement abstract method'
end

.decode_valueObject

Raises:

  • (NotImplementedError)


114
115
116
# File 'lib/ic_agent/candid.rb', line 114

def self.decode_value
  raise NotImplementedError, 'subclass must implement abstract method'
end

.encode_typeObject

Raises:

  • (NotImplementedError)


118
119
120
# File 'lib/ic_agent/candid.rb', line 118

def self.encode_type
  raise NotImplementedError, 'subclass must implement abstract method'
end

.encode_valueObject

Raises:

  • (NotImplementedError)


122
123
124
# File 'lib/ic_agent/candid.rb', line 122

def self.encode_value
  raise NotImplementedError, 'subclass must implement abstract method'
end

Instance Method Details

#build_type_table(type_table) ⇒ Object



104
105
106
107
108
# File 'lib/ic_agent/candid.rb', line 104

def build_type_table(type_table)
  unless type_table.has(self)
    self._build_type_table_impl(type_table)
  end
end

#displayObject



100
101
102
# File 'lib/ic_agent/candid.rb', line 100

def display
  return self.name
end