Method: Fregoo::FregooData#initialize
- Defined in:
- lib/fregoo/fregoo_data.rb
#initialize(hash) ⇒ FregooData
Returns a new instance of FregooData.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/fregoo/fregoo_data.rb', line 9 def initialize(hash) @ip = hash["ip"] @country_name = hash["country_name"] @country_code = hash["country_code"] @region_code = hash["region_code"] @region_name = hash["region_name"] @city = hash["city"] @zip_code = hash["zip_code"] @time_zone = hash["time_zone"] @latitude = hash["latitude"] @longitude = hash["longitude"] @metro_code = hash["metro_code"] end |