Exception: Jade::Interop::NotExposed

Inherits:
Error
  • Object
show all
Defined in:
lib/jade/interop/error.rb

Overview

Raised when a Ruby caller invokes a Jade function whose signature has no public boundary — typically a polymorphic fn, a fn with function-typed args, or a fn over a type whose Decodable/Encodable can’t be derived. The user’s options are to add an explicit ‘implements Decodable/Encodable`, restructure the signature with decodable types, or accept that the fn is Jade-internal only.

Instance Method Summary collapse

Constructor Details

#initialize(module_name:, function_name:, hint: nil) ⇒ NotExposed

Returns a new instance of NotExposed.



22
23
24
25
26
27
# File 'lib/jade/interop/error.rb', line 22

def initialize(module_name:, function_name:, hint: nil)
  ["#{module_name}.#{function_name} is not exposed to Ruby.", hint]
    .compact
    .join(' ')
    .then { super(it) }
end