Class: Geocoder::Result::Ipqualityscore
- Defined in:
- lib/geocoder/results/ipqualityscore.rb
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
#coordinates, #country_code, #initialize, #latitude, #longitude, #province, #province_code, #state
Constructor Details
This class inherits a constructor from Geocoder::Result::Base
Class Method Details
.key_method_mappings ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/geocoder/results/ipqualityscore.rb', line 7 def self.key_method_mappings { 'request_id' => :request_id, 'success' => :success?, 'message' => :message, 'city' => :city, 'region' => :state, 'country_code' => :country_code, 'mobile' => :mobile?, 'fraud_score' => :fraud_score, 'ISP' => :isp, 'ASN' => :asn, 'organization' => :organization, 'is_crawler' => :crawler?, 'host' => :host, 'proxy' => :proxy?, 'vpn' => :vpn?, 'tor' => :tor?, 'active_vpn' => :active_vpn?, 'active_tor' => :active_tor?, 'recent_abuse' => :recent_abuse?, 'bot_status' => :bot?, 'connection_type' => :connection_type, 'abuse_velocity' => :abuse_velocity, 'timezone' => :timezone, } end |
Instance Method Details
#address ⇒ Object
48 49 50 |
# File 'lib/geocoder/results/ipqualityscore.rb', line 48 def address [city, state, country_code].compact.reject(&:empty?).join(', ') end |
#postal_code ⇒ Object
44 45 46 |
# File 'lib/geocoder/results/ipqualityscore.rb', line 44 def postal_code '' # No suitable fallback end |