Class: ActionMCP::Gateway
- Inherits:
-
Object
- Object
- ActionMCP::Gateway
- Defined in:
- lib/action_mcp/gateway.rb
Direct Known Subclasses
Class Method Summary collapse
-
.identified_by(*klasses) ⇒ Object
pluck in one or many GatewayIdentifier classes.
- .identifier_classes ⇒ Object
Instance Method Summary collapse
-
#call ⇒ Object
called by your rack/websocket layer.
-
#initialize(request) ⇒ Gateway
constructor
A new instance of Gateway.
Constructor Details
#initialize(request) ⇒ Gateway
Returns a new instance of Gateway.
18 19 20 |
# File 'lib/action_mcp/gateway.rb', line 18 def initialize(request) @request = request end |
Class Method Details
.identified_by(*klasses) ⇒ Object
pluck in one or many GatewayIdentifier classes
9 10 11 |
# File 'lib/action_mcp/gateway.rb', line 9 def identified_by(*klasses) @identifier_classes = klasses.flatten end |
.identifier_classes ⇒ Object
13 14 15 |
# File 'lib/action_mcp/gateway.rb', line 13 def identifier_classes @identifier_classes || [] end |
Instance Method Details
#call ⇒ Object
called by your rack/websocket layer
23 24 25 26 27 |
# File 'lib/action_mcp/gateway.rb', line 23 def call identities = authenticate! assign_identities(identities) self end |