class Megam::TransferArea

class responsible for converting “you”, “root” to the correct directories. This is not a good way to do so.

Public Class Methods

convert_to_transferarea_dir(transferarea_name) click to toggle source
   # File lib/megam/transferarea.rb
22 def self.convert_to_transferarea_dir(transferarea_name)
23   temp_transferarea_name = transferarea_name.dup
24   temp_transferarea_name = temp_transferarea_name.gsub("you", transfer_you_dir) if temp_transferarea_name.match("you")
25 
26   temp_transferarea_name = temp_transferarea_name.gsub("root", transfer_root_dir) if temp_transferarea_name.match("root")
27   temp_transferarea_name = temp_transferarea_name.gsub(".", File::SEPARATOR)
28   temp_transferarea_name
29 end
transfer_root_dir() click to toggle source

the root directory. its stubbed out now to ~/Desktop/tmp/root

   # File lib/megam/transferarea.rb
32 def self.transfer_root_dir
33   File.join(File::SEPARATOR)
34 end
transfer_you_dir() click to toggle source

the home directory. its stubbed out now to ~/Desktop/tmp

   # File lib/megam/transferarea.rb
37 def self.transfer_you_dir
38   File.join(ENV['HOME']) || Dir.pwd
39 end