Sha256: cfde20c4ff0a5fd8747cc28f98eafa1434558339afc57ebb7042d6df435b1552

Contents?: true

Size: 605 Bytes

Versions: 1

Compression:

Stored size: 605 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

1 entries across 1 versions & 1 rubygems

Version Path
misp-0.1.1 lib/misp/orgc.rb