Sha256: 1482bf1a4788ef0b96840ea7e74d490a0d387b40fbd7b93c6a9829f2965022d9
Contents?: true
Size: 592 Bytes
Versions: 25
Compression:
Stored size: 592 Bytes
Contents
# frozen_string_literal: true module Mihari class Artifact attr_reader :data # # @param [String] data # @param [String, nil] message # def initialize(data, message: nil) @data = data @message = message end # @return [String, nil] def data_type TypeChecker.type data end # @return [String] def message @mesasge || data end # @return [true, false] def valid? !data_type.nil? end # @return [Hash] def to_h { data: data, data_type: data_type, message: message } end end end
Version data entries
25 entries across 25 versions & 1 rubygems