Sha256: 94600bb1334736b62f1058c6caf31da04916c25d8e11a61a95b3749fe3b7ed8a

Contents?: true

Size: 607 Bytes

Versions: 2

Compression:

Stored size: 607 Bytes

Contents

# frozen_string_literal: true

module MISP
  class Orgc < Base
    # @return [String]
    attr_reader :id
    # @return [String]
    attr_reader :name
    # @return [String]
    attr_reader :uuid

    def initialize(**attributes)
      attributes = normalize_attributes(**attributes)

      @id = attributes.dig(:id)
      @name = attributes.dig(:name)
      @uuid = attributes.dig(:uuid)
    end

    #
    # Returns a hash representation of the attribute data.
    #
    # @return [Hash]
    #
    def to_h
      {
        id: id,
        name: name,
        uuid: uuid,
      }.compact
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
misp-0.1.3 lib/misp/orgc.rb
misp-0.1.2 lib/misp/orgc.rb