class Hoodoo::Services::Discovery::ForRemote

Describe a “pseudo” resource endpoint location in terms of an interation context and wrapped “real” endpoint instance.

This is a very special case class used for wrapping endpoints in, for example, the inter-resource remote call code in the middleware and in the auto-session code in Hoodoo::Client::Endpoint::AutoSession.

Attributes

resource[RW]

The resource name described, as a Symbol (e.g. :Purchase).

version[RW]

Resource endpoint version, as an Integer (e.g. 2).

wrapped_endpoint[RW]

A wrapped Endpoint class, which will be used for the actual call to the remote resource, after pre/post-processing in the context of source_interaction (e.g. augmenting session permissions with source-resource-interface-specified additions necessary to call the target remote resource).

Public Class Methods

new( resource:, version:, wrapped_endpoint: ) click to toggle source

Create an instance with named parameters as follows:

resource

See resource.

version

See version.

wrapped_endpoint

See wrapped_endpoint.

# File lib/hoodoo/services/discovery/results/for_remote.rb, line 46
def initialize( resource:,
                version:,
                wrapped_endpoint: )

  self.resource         = resource.to_sym
  self.version          = version.to_i
  self.wrapped_endpoint = wrapped_endpoint
end