class MultimediaParadise::Video::ReportLocalVideos

Constants

NAMESPACE
#

NAMESPACE

#

Public Class Methods

[](i = '') click to toggle source
#

MultimediaParadise::Video::ReportLocalVideos[]

#
# File lib/multimedia_paradise/video/report_local_videos.rb, line 98
def self.[](i = '')
  new(i)
end
new( commandline_arguments = nil, run_already = true ) click to toggle source
#

initialize

#
# File lib/multimedia_paradise/video/report_local_videos.rb, line 36
def initialize(
    commandline_arguments = nil,
    run_already           = true
  )
  reset
  set_commandline_arguments(
    commandline_arguments
  )
  run if run_already
end

Public Instance Methods

report_how_many_video_files_are_under_the_realvids_subdirectory() click to toggle source
#

report_how_many_video_files_are_under_the_realvids_subdirectory

#
# File lib/multimedia_paradise/video/report_local_videos.rb, line 69
def report_how_many_video_files_are_under_the_realvids_subdirectory
  _ = directory_to_realvids?
  if File.directory? _
    # ===================================================================== #
    # Select all video-files next:
    # ===================================================================== #
    all_video_files = Dir[_+'**'].select {|entry| is_a_video_file?(entry) }
    e rev+'There are a total of '+sfancy(all_video_files.size.to_s)+' videos '\
      'available in the directory `'+
      sdir(_)+'`.'
    e
  end
end
report_how_many_videos_are_registered_in_the_main_video_yaml_file() click to toggle source
#

report_how_many_videos_are_registered_in_the_main_video_yaml_file

#
# File lib/multimedia_paradise/video/report_local_videos.rb, line 86
def report_how_many_videos_are_registered_in_the_main_video_yaml_file
  _ = ::MultimediaParadise.file_video_collection?
  if File.exist? _
    dataset = YAML.load_file(_)
    e rev+'A total of '+royalblue(dataset.keys.size.to_s)+' videos are '\
      'registered in the file '+sfile(_)+'.'
  end
end
reset() click to toggle source
#

reset (reset tag)

#
Calls superclass method MultimediaParadise::Base#reset
# File lib/multimedia_paradise/video/report_local_videos.rb, line 50
def reset
  super()
  # ======================================================================= #
  # === @namespace
  # ======================================================================= #
  @namespace = NAMESPACE
end
run() click to toggle source
#

run (run tag)

#
# File lib/multimedia_paradise/video/report_local_videos.rb, line 61
def run
  report_how_many_video_files_are_under_the_realvids_subdirectory
  report_how_many_videos_are_registered_in_the_main_video_yaml_file
end