Sha256: 21c79e139035eaad5602c74effcba90ea45db2f8ada7142c5e790e2657d9790f

Contents?: true

Size: 767 Bytes

Versions: 2

Compression:

Stored size: 767 Bytes

Contents

# frozen_string_literal: true

module MkvToolNix
  module Types
    module Info
      class Attachment

        attr_accessor :id, :uid, :file_name, :description, :content_type, :size_in_b

        def self.create(hash)
          props = hash['properties']
          new(id: hash['id'], uid: props['uid'], file_name: hash['file_name'], description: hash['description'],
              content_type: hash['content_type'], size_in_b: hash['size'])
        end

        def initialize(id:, uid:, file_name:, description:, content_type:, size_in_b:)
          @id = id
          @uid = uid
          @file_name = file_name
          @description = description
          @content_type = content_type
          @size_in_b = size_in_b
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mkvtoolnix-1.0.0 lib/mkvtoolnix/types/info/attachment.rb
mkvtoolnix-0.7.0 lib/mkvtoolnix/types/info/attachment.rb