Class: Cloudflare::IPs

Inherits:
Representation show all
Defined in:
lib/cloudflare/ips.rb

Constant Summary

Constants inherited from Representation

Representation::WRAPPER

Instance Method Summary collapse

Methods inherited from Representation

#errors, #messages, #represent, #represent_message, #representation, #result, #results, #success?, #to_hash, #to_id

Instance Method Details

#cidrs(ipv: nil) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/cloudflare/ips.rb', line 7

def cidrs(ipv: nil)
	if ipv
		result[:"ipv#{ipv}_cidrs"]
	else
		result[:ipv4_cidrs].to_a + result[:ipv6_cidrs].to_a
	end
end