Sha256: 82a0e156f8f7c3d7dc43c1a048a77adeb20f1fd4282f4c5b4c238d46e6bf63f1

Contents?: true

Size: 452 Bytes

Versions: 6

Compression:

Stored size: 452 Bytes

Contents

# frozen_string_literal: true

module Mihari
  class WhoisRecord < ActiveRecord::Base
    belongs_to :artifact

    @memo = {}

    class << self
      include Dry::Monads[:result]

      #
      # Build whois record
      #
      # @param [Stinrg] domain
      #
      # @return [WhoisRecord, nil]
      #
      def build_by_domain(domain)
        result = Enrichers::Whois.query_result(domain)
        result.value_or nil
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mihari-5.4.9 lib/mihari/models/whois.rb
mihari-5.4.8 lib/mihari/models/whois.rb
mihari-5.4.7 lib/mihari/models/whois.rb
mihari-5.4.6 lib/mihari/models/whois.rb
mihari-5.4.5 lib/mihari/models/whois.rb
mihari-5.4.4 lib/mihari/models/whois.rb