Class: CarrierWave::Video::Thumbnailer::FFMpegThumbnailerOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/carrierwave/video/thumbnailer/ffmpegthumbnailer/options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options) ⇒ FFMpegThumbnailerOptions

Returns a new instance of FFMpegThumbnailerOptions.



55
56
57
58
59
60
61
# File 'lib/carrierwave/video/thumbnailer/ffmpegthumbnailer/options.rb', line 55

def initialize options
  @callbacks  = options.delete(:callbacks) || {}
  @custom     = options.delete  :custom
  @format     = options.delete  :format
  @logger     = options.delete  :logger
  @options    = Options.new     options
end

Instance Attribute Details

#callbacksObject (readonly)

Returns the value of attribute callbacks.



53
54
55
# File 'lib/carrierwave/video/thumbnailer/ffmpegthumbnailer/options.rb', line 53

def callbacks
  @callbacks
end

#customObject (readonly)

Returns the value of attribute custom.



53
54
55
# File 'lib/carrierwave/video/thumbnailer/ffmpegthumbnailer/options.rb', line 53

def custom
  @custom
end

#formatObject (readonly)

Returns the value of attribute format.



53
54
55
# File 'lib/carrierwave/video/thumbnailer/ffmpegthumbnailer/options.rb', line 53

def format
  @format
end

#loggerObject (readonly)

Returns the value of attribute logger.



53
54
55
# File 'lib/carrierwave/video/thumbnailer/ffmpegthumbnailer/options.rb', line 53

def logger
  @logger
end

#optionsObject (readonly)

Returns the value of attribute options.



53
54
55
# File 'lib/carrierwave/video/thumbnailer/ffmpegthumbnailer/options.rb', line 53

def options
  @options
end

Instance Method Details

#to_cliObject



63
64
65
# File 'lib/carrierwave/video/thumbnailer/ffmpegthumbnailer/options.rb', line 63

def to_cli
  %Q{#{"-c #{format} " if format}#{@options.to_cli}#{" #{custom}" if custom}}
end