Sha256: 96e8e18bf6bc728cb385e651f48fb87f3ce11cb038ec87c86a25dc8adc32b1c2
Contents?: true
Size: 571 Bytes
Versions: 40
Compression:
Stored size: 571 Bytes
Contents
require "ftw/namespace" # Provide resolution name -> address mappings through hash lookups class FTW::DNS::Hash private # A new hash dns resolver. # # @param [#[]] data Must be a hash-like thing responding to #[] def initialize(data={}) @data = data end # def initialize # Resolve a hostname. # # It will return an array of all known addresses for the host. def resolve(hostname) result = @data[hostname] return nil if result.nil? return result if result.is_a?(Array) return [result] end # def resolve public(:resolve) end
Version data entries
40 entries across 40 versions & 1 rubygems