class Jamf::IPAddress

A wrapper for IPAddr - allowing initialize to take an unused cnx: and providing to_jamf

Public Class Methods

new(an_ip) click to toggle source

@param an_ip

@param cnx [void] unused, but required

Calls superclass method
   # File lib/jamf/api/jamf_pro/other_classes/ip_address.rb
40 def initialize(an_ip)
41 
42   if an_ip.nil?
43     @empty_ip = true
44     return
45   end
46 
47   super an_ip
48 end

Public Instance Methods

to_jamf() click to toggle source

@return [String] the IP formatted for passing to the API as a string.

   # File lib/jamf/api/jamf_pro/other_classes/ip_address.rb
52 def to_jamf
53   return Jamf::BLANK if @empty_ip
54   to_s
55 end