Sha256: 88559cec3076561947ff9353fa25f3b16dc8d0bcbd5ef9a81d429ab7a876adba
Contents?: true
Size: 649 Bytes
Versions: 27
Compression:
Stored size: 649 Bytes
Contents
# frozen_string_literal: true require "dnpedia" module Mihari module Analyzers class DNPedia < Base param :query option :tags, default: proc { [] } def artifacts search || [] end private def api @api ||= ::DNPedia::API.new end # # Search # # @return [Array<Mihari::Artifact>] # def search res = api.search(query) rows = res["rows"] || [] rows.map do |row| data = [row["name"], row["zoneid"]].join(".") Artifact.new(data: data, source: source, metadata: row) end end end end end
Version data entries
27 entries across 27 versions & 1 rubygems