module Import

Module for Importing Informations

Public Class Methods

import_config() click to toggle source

This Module parses the youtube_dlhelper.conf @return [Array] music_dir, ogg_file_accept, ffmpeg_binary

# File lib/youtube_dlhelper/import_config.rb, line 17
def self.import_config
  home = Dir.home
  config = ParseConfig.new(File.join("#{home}/.youtube_dlhelper/youtube_dlhelper.conf"))
  # @note Saving the variable musiddir
  music_dir = config['musicdir'].to_s
  # @note Saving the variable ogg_file_accept
  ogg_file_accept = config['ogg_file_accept'].to_s
  # @note It returns a array with music_dir, ogg_file_accept, ffmpeg_binary
  [music_dir, ogg_file_accept]
end