403Webshell
Server IP : 104.21.14.103  /  Your IP : 18.118.217.124
Web Server : LiteSpeed
System : Linux business53.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64
User : giankuin ( 1871)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector//memory.rb
require_relative '../../puppet/indirector/terminus'

# Manage a memory-cached list of instances.
class Puppet::Indirector::Memory < Puppet::Indirector::Terminus
  def initialize
    clear
  end

  def clear
    @instances = {}
  end

  def destroy(request)
    raise ArgumentError.new(_("Could not find %{request} to destroy") % { request: request.key }) unless @instances.include?(request.key)
    @instances.delete(request.key)
  end

  def find(request)
    @instances[request.key]
  end

  def search(request)
    found_keys = @instances.keys.find_all { |key| key.include?(request.key) }
    found_keys.collect { |key| @instances[key] }
  end

  def head(request)
    not find(request).nil?
  end

  def save(request)
    @instances[request.key] = request.instance
  end
end

Youez - 2016 - github.com/yon3zu
LinuXploit