class MkvToolNix::Types::Merge::Attachment

Attributes

description[R]
file[R]
mime_type[R]
name[R]

Public Class Methods

new(file) click to toggle source
# File lib/mkvtoolnix/types/merge/attachment.rb, line 25
def initialize(file)
  @file = file
end

Public Instance Methods

add_to_cmd(cmd) click to toggle source
# File lib/mkvtoolnix/types/merge/attachment.rb, line 29
def add_to_cmd(cmd)
  unless @file.nil?
    cmd << '--attachment-description' << @description unless @description.nil?
    cmd << '--attachment-mime-type' << @mime_type unless @mime_type.nil?
    cmd << '--attachment-name' << @name unless @name.nil?
    cmd << '--attach-file' << @file
  end
  nil
end
with_description(description) click to toggle source
# File lib/mkvtoolnix/types/merge/attachment.rb, line 20
def with_description(description)
  @description = description
  self
end
with_mime_type(type) click to toggle source
# File lib/mkvtoolnix/types/merge/attachment.rb, line 10
def with_mime_type(type)
  @mime_type = type
  self
end
with_name(name) click to toggle source
# File lib/mkvtoolnix/types/merge/attachment.rb, line 15
def with_name(name)
  @name = name
  self
end