Sha256: 8b438c2ba6bc4af728e8ae7ee39b0775cda2138035cb78c75d97ed6197ef63f7

Contents?: true

Size: 594 Bytes

Versions: 1

Compression:

Stored size: 594 Bytes

Contents

# frozen_string_literal: true

module MISP
  class Org < 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[:id]
      @name = attributes[:name]
      @uuid = attributes[: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.4 lib/misp/org.rb