Sha256: 6cb9744168ced0e75dd678650423132dd83e51b8df4f8d80e51caf8d16fc0444

Contents?: true

Size: 367 Bytes

Versions: 15

Compression:

Stored size: 367 Bytes

Contents

module WorldFlags
  module Helper
  	module Geo
      def self.ip_json
        require "httparty"

        HTTParty.get('http://freegeoip.net/json/')
      end

  		def self.ip_country_code
      	@ip_country_code ||= ip_json.parsed_response['country_code']
      end

  		def ip_country_code
      	WorldFlags::Helper::Geo.ip_country_code
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
world-flags-0.4.5 lib/world_flags/helper/geo.rb
world-flags-0.4.4 lib/world_flags/helper/geo.rb
world-flags-0.4.3 lib/world_flags/helper/geo.rb
world-flags-0.4.2 lib/world_flags/helper/geo.rb
world-flags-0.4.1 lib/world_flags/helper/geo.rb
world-flags-0.4.0 lib/world_flags/helper/geo.rb
world-flags-0.3.6 lib/world_flags/helper/geo.rb
world-flags-0.3.5 lib/world_flags/helper/geo.rb
world-flags-0.3.4 lib/world_flags/helper/geo.rb
world-flags-0.3.2.2 lib/world_flags/helper/geo.rb
world-flags-0.3.2.1 lib/world_flags/helper/geo.rb
world-flags-0.3.2 lib/world_flags/helper/geo.rb
world-flags-0.3.1 lib/world_flags/helper/geo.rb
world-flags-0.3.0 lib/world_flags/helper/geo.rb
world-flags-0.2.7 lib/world_flags/helper/geo.rb