Module: Netscaler

Defined in:
lib/netscaler/lb/vserver/unbind.rb,
lib/netscaler.rb,
lib/netscaler/cs.rb,
lib/netscaler/ha.rb,
lib/netscaler/lb.rb,
lib/netscaler/ssl.rb,
lib/netscaler/policy.rb,
lib/netscaler/server.rb,
lib/netscaler/system.rb,
lib/netscaler/adapter.rb,
lib/netscaler/ha/node.rb,
lib/netscaler/rewrite.rb,
lib/netscaler/service.rb,
lib/netscaler/cs/policy.rb,
lib/netscaler/responder.rb,
lib/netscaler/connection.rb,
lib/netscaler/cs/vserver.rb,
lib/netscaler/lb/monitor.rb,
lib/netscaler/lb/vserver.rb,
lib/netscaler/ssl/certkey.rb,
lib/netscaler/ssl/vserver.rb,
lib/netscaler/system/file.rb,
lib/netscaler/http_adapter.rb,
lib/netscaler/mock_adapter.rb,
lib/netscaler/servicegroup.rb,
lib/netscaler/cs/policylabel.rb,
lib/netscaler/load_balancing.rb,
lib/netscaler/monkey_patches.rb,
lib/netscaler/rewrite/action.rb,
lib/netscaler/rewrite/policy.rb,
lib/netscaler/cs/vserver/bind.rb,
lib/netscaler/lb/vserver/bind.rb,
lib/netscaler/policy/stringmap.rb,
lib/netscaler/responder/action.rb,
lib/netscaler/responder/policy.rb,
lib/netscaler/ssl/vserver/bind.rb,
lib/netscaler/system/interface.rb,
lib/netscaler/cs/vserver/unbind.rb,
lib/netscaler/netscaler_service.rb,
lib/netscaler/ssl/vserver/unbind.rb

Overview

require ‘netscaler/netscaler_service’

Defined Under Namespace

Classes: Adapter, Connection, Cs, Ha, HttpAdapter, Lb, LoadBalancing, MockAdapter, NetscalerService, Policy, Responder, Rewrite, Server, Service, ServiceGroup, Ssl, System

Class Method Summary collapse

Class Method Details

.hash_hack(hash) ⇒ Object

#hash_hack is mainly used in all the methods to provide backward compatibility for the older methods.

Prior to this the method argument keys were string.  We later made them to symbols.  This allows users
to use both but will eventually deprecate this.

Raises:

  • (ArgumentError)


5
6
7
8
9
# File 'lib/netscaler/monkey_patches.rb', line 5

def self.hash_hack(hash)
  raise ArgumentError, 'payload must be a hash.' unless hash.is_a?(Hash)
  hash.default_proc = proc{|h, k| h.key?(k.to_s) ? h[k.to_s] : nil}
  return hash
end