Class: Netscaler::NetscalerService
- Inherits:
-
Object
- Object
- Netscaler::NetscalerService
- Defined in:
- lib/netscaler/netscaler_service.rb
Direct Known Subclasses
Cs::Policy, Cs::Policylabel, Cs::Vserver, Cs::Vserver::Bind, Cs::Vserver::Unbind, Ha::Node, Lb::Monitor, Lb::Vserver, Lb::Vserver::Bind, Lb::Vserver::Unbind, LoadBalancing, Policy::Stringmap, Responder::Action, Responder::Policy, Rewrite::Action, Rewrite::Policy, Server, Service, ServiceGroup, Ssl::Certkey, Ssl::Vserver, Ssl::Vserver::Bind, Ssl::Vserver::Unbind, System::File, System::Interface
Instance Method Summary collapse
Instance Method Details
#validate_payload(payload, required_args) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/netscaler/netscaler_service.rb', line 3 def validate_payload(payload, required_args) payload = Netscaler.hash_hack(payload) raise ArgumentError, 'payload must be a hash.' unless payload.is_a?(Hash) missing_args=[] required_args.each do |arg| missing_args << arg unless payload[arg] != nil end raise ArgumentError, "Missing required arguments. #{missing_args.join(', ')}" unless missing_args.length == 0; end |