Class: TimezoneDetection::IpTimezone
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- TimezoneDetection::IpTimezone
- Extended by:
- IpConvertion
- Defined in:
- app/models/timezone_detection/ip_timezone.rb
Instance Attribute Summary collapse
-
#ip ⇒ Object
Returns the value of attribute ip.
Class Method Summary collapse
Methods included from IpConvertion
Instance Attribute Details
#ip ⇒ Object
Returns the value of attribute ip.
6 7 8 |
# File 'app/models/timezone_detection/ip_timezone.rb', line 6 def ip @ip end |
Class Method Details
.find_ip(ip) ⇒ Object
10 11 12 |
# File 'app/models/timezone_detection/ip_timezone.rb', line 10 def self.find_ip(ip) IpTimezone.where(ip_in_longint: IpTimezone.ip2long(ip)) end |