A struct-like class for passing around a client request. It’s mostly just used for validation and authorization.
# File lib/puppet/network/client_request.rb, line 20 def initialize(name, ip, authenticated) @name, @ip, @authenticated = name, ip, authenticated end
# File lib/puppet/network/client_request.rb, line 7 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.
# File lib/puppet/network/client_request.rb, line 14 def call raise ArgumentError, "Request is not set up; cannot build call" unless handler and method [handler, method].join(".") end
# File lib/puppet/network/client_request.rb, line 24 def to_s "#{self.name}(#{self.ip})" end