?
Current Path : /usr/share/ruby/vendor_ruby/puppet/network/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/ruby/vendor_ruby/puppet/network/client_request.rb |
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 raise ArgumentError, "Request is not set up; cannot build call" unless handler and method [handler, method].join(".") end def initialize(name, ip, authenticated) @name, @ip, @authenticated = name, ip, authenticated end def to_s "#{self.name}(#{self.ip})" end end end