Class: SecurityGuard::CountryIps
- Inherits:
-
Object
- Object
- SecurityGuard::CountryIps
- Defined in:
- lib/security_guard/country_ips.rb
Instance Method Summary collapse
-
#initialize(args = nil) ⇒ CountryIps
constructor
A new instance of CountryIps.
- #result ⇒ Object
Methods included from SecurityGuard::Concerns::Initializable
included, #initializable_attrs
Methods included from SecurityGuard::Concerns::AcceptsFromFile
Constructor Details
Instance Method Details
#result ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/security_guard/country_ips.rb', line 14 def result country_ips = [] ips.each do |ip| @geoip.ip_address = ip country_ips << ip if countries.include?(@geoip.country_name) end country_ips.sort end |