Method: Jamf::NetworkSegment.masked_starting_address

Defined in:
lib/jamf/api/classic/api_objects/network_segment.rb

.masked_starting_address(starting_address: nil, mask: nil, cidr: nil) ⇒ String

If we are given a mask or cidr, append them to the starting_address

Parameters:

  • starting (String)

    The starting address, possibly masked

  • mask (String) (defaults to: nil)

    The subnet mask to apply to the starting address to get the ending address

  • cidr (String, Integer) (defaults to: nil)

    he cidr value to apply to the starting address to get the ending address

Returns:

  • (String)

    the starting with the mask or cidr appended



221
222
223
224
# File 'lib/jamf/api/classic/api_objects/network_segment.rb', line 221

def self.masked_starting_address(starting_address: nil, mask: nil, cidr: nil)
  starting_address = "#{starting}/#{mask || cidr}" if mask || cidr
  starting_address.to_s
end