Class: Schema::Node::Which

Inherits:
T::Enum
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/capnp/generator/schema.capnp.rb

Class Method Summary collapse

Class Method Details

.from_integer(value) ⇒ Object



288
289
290
291
292
293
294
295
296
297
298
# File 'lib/capnp/generator/schema.capnp.rb', line 288

def self.from_integer(value)
  case value
  when 0 then File
  when 1 then Struct
  when 2 then Enum
  when 3 then Interface
  when 4 then Const
  when 5 then Annotation
  else raise "Unknown Which value: #{value}"
  end
end