File: location.rb

package info (click to toggle)
ruby-maxminddb 0.1.22-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 200 kB
  • sloc: ruby: 926; makefile: 3
file content (33 lines) | stat: -rw-r--r-- 461 bytes parent folder | download
1
2
3
4
5
6
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
module MaxMindDB
  class Result
    class Location
      def initialize(raw)
        @raw = raw || {}
      end

      def latitude
        raw['latitude']
      end

      def longitude
        raw['longitude']
      end

      def metro_code
        raw['metro_code']
      end

      def time_zone
        raw['time_zone']
      end

      def accuracy_radius
        raw['accuracy_radius']
      end

      private

      attr_reader :raw
    end
  end
end