class MaxMindDB::Reader

Defined in:

maxminddb/reader.cr

Constructors

Instance Method Summary

Instance methods inherited from class Reference

==(other : MaxMindDB::Any) ==

Instance methods inherited from class Object

===(other : MaxMindDB::Any) ===

Constructor Detail

def self.new(db_path : String, cache_max_size : Int32 | Nil = nil) #

[View source]
def self.new(db : Bytes | IO::Memory, cache_max_size : Int32 | Nil = nil) #

[View source]

Instance Method Detail

def get(address : String | Int) : Any #

[View source]
def get(address : IPAddress) : Any #

[View source]
def get_with_prefix_length(address : String | Int) : Tuple(Any, Int32) #

[View source]
def get_with_prefix_length(address : IPAddress) : Tuple(Any, Int32) #

[View source]
def inspect(io : IO) #
Description copied from class Reference

Appends a String representation of this object which includes its class name, its object address and the values of all instance variables.

class Person
  def initialize(@name : String, @age : Int32)
  end
end

Person.new("John", 32).inspect # => #<Person:0x10fd31f20 @name="John", @age=32>

[View source]
def metadata : MaxMindDB::Metadata #

[View source]