Class: Netscaler::Responder::Policy

Inherits:
NetscalerService show all
Defined in:
lib/netscaler/responder/policy.rb

Instance Method Summary collapse

Methods inherited from NetscalerService

#validate_payload

Constructor Details

#initialize(netscaler) ⇒ Policy

Returns a new instance of Policy.



7
8
9
# File 'lib/netscaler/responder/policy.rb', line 7

def initialize(netscaler)
  @netscaler=netscaler
end

Instance Method Details

#show(payload = {}) ⇒ Object



11
12
13
14
15
16
17
18
19
20
# File 'lib/netscaler/responder/policy.rb', line 11

def show(payload={})
  if payload[:name] != nil then
    validate_payload(payload, [:name])
    return @netscaler.adapter.get("config/responderpolicy/#{payload[:name]}")
  elsif payload == {} then
    return @netscaler.adapter.get('config/responderpolicy/')
  else
    raise ArgumentError, 'payload supplied must have been missing :name'
  end
end