Sha256: 8a0f2333e62f4a87cb7742e08d2064349a192479dc4bdd6257ddfda7b1bff389

Contents?: true

Size: 453 Bytes

Versions: 18

Compression:

Stored size: 453 Bytes

Contents

module Jpmobile
  module Mobile
    module IpAddresses
      class AbstractIpAddresses
        def valid_ip?(remote_ip_str)
          begin
            remote_ip = IPAddr.new(remote_ip_str)
          rescue
            return false
          end

          self.class.ip_address_list.any? {|ip| ip.include?(remote_ip)}
        end

        class << self
          def ip_address_list
            []
          end
        end
      end
    end
  end
end

Version data entries

18 entries across 10 versions & 2 rubygems

Version Path
jpmobile-ipaddresses-0.0.2 lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-1.0.0.pre.4 test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-1.0.0.pre.4 test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-1.0.0.pre.3 test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-1.0.0.pre.3 test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-1.0.0.pre.2 test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-1.0.0.pre.2 test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-1.0.0.pre.1 test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-1.0.0.pre.1 test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-1.0.0.pre test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-1.0.0.pre test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-0.1.6 test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-0.1.6 test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-0.1.5 test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-0.1.5 test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-0.1.4 test/rails/rails_root/vendor/plugins/jpmobile/vendor/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-0.1.4 test/rails/rails_root/vendor/plugins/jpmobile-ipaddresses/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
jpmobile-ipaddresses-0.0.1 lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb