Sha256: d6ebec3f5a38345537d0b6b18bc0f791cba7eb77410ae734e9a3885ba7b8b9c1
Contents?: true
Size: 769 Bytes
Versions: 23
Compression:
Stored size: 769 Bytes
Contents
module BatchManager module Utils def self.included(base) base.send :include, OverallMethods base.extend OverallMethods end module OverallMethods def batch_name(filename_or_path) if filename_or_path.start_with?(::BatchManager.batch_dir) path = filename_or_path.sub("#{::BatchManager.batch_dir}/", "") else path = filename_or_path end path.sub(".rb", "") end def batch_full_path(filename_or_path) if filename_or_path.start_with?(::BatchManager.batch_dir) path = filename_or_path else path = File.join(::BatchManager.batch_dir, filename_or_path) end path.end_with?(".rb") ? path : path + ".rb" end end end end
Version data entries
23 entries across 23 versions & 1 rubygems