Module: PostHog::MCP::Callbacks Private
- Defined in:
- lib/posthog/mcp/identity.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Invokes user callbacks with (request, extra), tolerating 1-arity lambdas.
Class Method Summary collapse
Class Method Details
.call(callable, request, extra) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
184 185 186 187 188 189 190 191 |
# File 'lib/posthog/mcp/identity.rb', line 184 def call(callable, request, extra) arity = callable.respond_to?(:arity) ? callable.arity : 2 case arity when 0 then callable.call when 1 then callable.call(request) else callable.call(request, extra) end end |