Class: Jamf::IPAddress
- Defined in:
- lib/jamf/api/attribute_classes/ip_address.rb
Overview
A wrapper for IPAddr - allowing initialize to take an unused cnx: and providing #to_jamf
Instance Method Summary collapse
-
#initialize(an_ip, cnx: nil) ⇒ IPAddress
constructor
A new instance of IPAddress.
-
#to_jamf ⇒ String
The IP formatted for passing to the API as a string.
Constructor Details
#initialize(an_ip, cnx: nil) ⇒ IPAddress
Returns a new instance of IPAddress.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/jamf/api/attribute_classes/ip_address.rb', line 45 def initialize(an_ip, cnx: nil) cnx.to_s # shutup rubocop. if an_ip.nil? @empty_ip = true return end super an_ip end |