Sha256: 269d9a6ba2490ce2593c86fd92c41529bae2d4c6f35cc0dad50011b2dbded2f3

Contents?: true

Size: 606 Bytes

Versions: 2

Compression:

Stored size: 606 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.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/org.rb
misp-0.1.2 lib/misp/org.rb