Sha256: 17cd880960a0e2bac9a9a2495aea77ac3ff65db0f6084a792822779e59311bb2

Contents?: true

Size: 679 Bytes

Versions: 6

Compression:

Stored size: 679 Bytes

Contents

module Libis
  module Format
    class Info
      attr_reader :name, :category, :description, :puids, :mimetypes, :extensions

      def initialize(name:, category:, description: '', puids: [], mimetypes: [], extensions: [])
        @name = name
        @category = category
        @description = description
        @puids = puids
        @mimetypes = mimetypes
        @extensions = extensions
      end

      def to_hash
        {
            name: name,
            description: description.dup,
            category: category,
            puids: puids.dup,
            mimetypes: mimetypes.dup,
            extensions: extensions.dup
        }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
libis-format-2.0.5 lib/libis/format/info.rb
libis-format-2.0.4 lib/libis/format/info.rb
libis-format-2.0.3 lib/libis/format/info.rb
libis-format-2.0.2 lib/libis/format/info.rb
libis-format-2.0.1 lib/libis/format/info.rb
libis-format-2.0.0 lib/libis/format/info.rb