Method: Netdot::Ipblock#initialize

Defined in:
lib/netdot/ipblock.rb

#initialize(argv = {}) ⇒ Ipblock

Constructor

Parameters:

  • argv (Hash) (defaults to: {})

    a customizable set of options

Options Hash (argv):

  • :connection (Hash) — default: REQUIRED

    a Netdot::RestClient object



9
10
11
12
13
14
15
# File 'lib/netdot/ipblock.rb', line 9

def initialize(argv = {})
  [:connection].each do |k|
    fail ArgumentError, "Missing required argument '#{k}'" unless argv[k]
  end

  argv.each { |k, v| instance_variable_set("@#{k}", v) }
end