Sha256: b98770af80fe9ef26ba2751cc62949a9836e8fdb436bd623e235ae9e423a1b68
Contents?: true
Size: 943 Bytes
Versions: 16
Compression:
Stored size: 943 Bytes
Contents
module Puppet::Network # :nodoc: # A struct-like class for passing around a client request. It's mostly # just used for validation and authorization. class ClientRequest attr_accessor :name, :ip, :authenticated, :handler, :method def authenticated? self.authenticated end # A common way of talking about the full call. Individual servers # are responsible for setting the values correctly, but this common # format makes it possible to check rights. def call unless handler and method raise ArgumentError, "Request is not set up; cannot build call" end [handler, method].join(".") end def initialize(name, ip, authenticated) @name, @ip, @authenticated = name, ip, authenticated end def to_s "%s(%s)" % [self.name, self.ip] end end end
Version data entries
16 entries across 16 versions & 1 rubygems