Class: Schema::Field::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



435
436
437
438
439
440
441
# File 'lib/capnp/generator/schema.capnp.rb', line 435

def self.from_integer(value)
  case value
  when 0 then Slot
  when 1 then Group
  else raise "Unknown Which value: #{value}"
  end
end