Sha256: fedba02753f1dbc3e829f233cc8bb4316b0fd6dd87a47966496e4c6333aba873

Contents?: true

Size: 431 Bytes

Versions: 5

Compression:

Stored size: 431 Bytes

Contents

module Netscaler
  class NetscalerService
    def validate_payload(payload, required_args)
      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



  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
netscaler-0.3.2 lib/netscaler/netscaler_service.rb
netscaler-0.3.1 lib/netscaler/netscaler_service.rb
netscaler-0.3.0 lib/netscaler/netscaler_service.rb
netscaler-0.2.0 lib/netscaler/netscaler_service.rb
netscaler-0.1.0 lib/netscaler/netscaler_service.rb