module Ec2IpRanges
Constants
- RAW_DATA
- VERSION
Public Class Methods
address_ranges()
click to toggle source
# File lib/ec2_ip_ranges.rb, line 13 def self.address_ranges @@address_ranges ||= RAW_DATA.map { |i| IPAddr.new(i) } end
ec2_ip?(ip_address_string)
click to toggle source
# File lib/ec2_ip_ranges.rb, line 7 def self.ec2_ip?(ip_address_string) test_ip = IPAddr.new(ip_address_string) address_ranges.select{ |range| range === test_ip }.any? end