module Google::Protobuf::Internal::TypeSafety

Public Instance Methods

to_native(value, ctx = nil) click to toggle source
Calls superclass method
# File lib/google/protobuf/ffi/internal/type_safety.rb, line 14
def to_native(value, ctx = nil)
  if value.kind_of?(self) or value.nil?
    super
  else
    raise TypeError.new "Expected a kind of #{name}, was #{value.class}"
  end
end