Class: IpwhoApi::GeoData
- Inherits:
-
Struct
- Object
- Struct
- IpwhoApi::GeoData
- Defined in:
- lib/ipwho.rb
Instance Attribute Summary collapse
-
#connection ⇒ Object
Returns the value of attribute connection.
-
#currency ⇒ Object
Returns the value of attribute currency.
-
#flag ⇒ Object
Returns the value of attribute flag.
-
#geoLocation ⇒ Object
Returns the value of attribute geoLocation.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#security ⇒ Object
Returns the value of attribute security.
-
#timezone ⇒ Object
Returns the value of attribute timezone.
-
#userAgent ⇒ Object
Returns the value of attribute userAgent.
Class Method Summary collapse
Instance Attribute Details
#connection ⇒ Object
Returns the value of attribute connection
166 167 168 |
# File 'lib/ipwho.rb', line 166 def connection @connection end |
#currency ⇒ Object
Returns the value of attribute currency
166 167 168 |
# File 'lib/ipwho.rb', line 166 def currency @currency end |
#flag ⇒ Object
Returns the value of attribute flag
166 167 168 |
# File 'lib/ipwho.rb', line 166 def flag @flag end |
#geoLocation ⇒ Object
Returns the value of attribute geoLocation
166 167 168 |
# File 'lib/ipwho.rb', line 166 def geoLocation @geoLocation end |
#ip ⇒ Object
Returns the value of attribute ip
166 167 168 |
# File 'lib/ipwho.rb', line 166 def ip @ip end |
#security ⇒ Object
Returns the value of attribute security
166 167 168 |
# File 'lib/ipwho.rb', line 166 def security @security end |
#timezone ⇒ Object
Returns the value of attribute timezone
166 167 168 |
# File 'lib/ipwho.rb', line 166 def timezone @timezone end |
#userAgent ⇒ Object
Returns the value of attribute userAgent
166 167 168 |
# File 'lib/ipwho.rb', line 166 def userAgent @userAgent end |
Class Method Details
.from_hash(hash) ⇒ Object
170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/ipwho.rb', line 170 def self.from_hash(hash) new( ip: hash["ip"] || "", geoLocation: hash["geoLocation"] ? GeoLocation.from_hash(hash["geoLocation"]) : nil, timezone: hash["timezone"] ? Timezone.from_hash(hash["timezone"]) : nil, flag: hash["flag"] ? Flag.from_hash(hash["flag"]) : nil, currency: hash["currency"] ? Currency.from_hash(hash["currency"]) : nil, connection: hash["connection"] ? Connection.from_hash(hash["connection"]) : nil, security: hash["security"] ? Security.from_hash(hash["security"]) : nil, userAgent: hash["userAgent"] ? UserAgent.from_hash(hash["userAgent"]) : nil ) end |