Sha256: eb90ac92bd15ef0bd07df756084ea4df39db467eada99856d5551ca81f5202d2

Contents?: true

Size: 610 Bytes

Versions: 6

Compression:

Stored size: 610 Bytes

Contents

# frozen_string_literal: true

module EhbrsRubyUtils
  module Videos2
    module Profiles
      module Base
        extend ::ActiveSupport::Concern

        attr_reader :convert_job

        included do
          include ActiveSupport::Callbacks
          define_callbacks :convert, :swap
        end

        def ffmpeg_args
          []
        end

        def on_convert_job
          old_value = convert_job
          begin
            yield
          ensure
            self.convert_job = old_value
          end
        end

        private

        attr_writer :convert_job
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ehbrs_ruby_utils-0.44.3 lib/ehbrs_ruby_utils/videos2/profiles/base.rb
ehbrs_ruby_utils-0.44.2 lib/ehbrs_ruby_utils/videos2/profiles/base.rb
ehbrs_ruby_utils-0.44.1 lib/ehbrs_ruby_utils/videos2/profiles/base.rb
ehbrs_ruby_utils-0.44.0 lib/ehbrs_ruby_utils/videos2/profiles/base.rb
ehbrs_ruby_utils-0.41.1 lib/ehbrs_ruby_utils/videos2/profiles/base.rb
ehbrs_ruby_utils-0.41.0 lib/ehbrs_ruby_utils/videos2/profiles/base.rb