class Jasmine::PathMapper
Public Class Methods
new(config)
click to toggle source
# File lib/jasmine/path_mapper.rb, line 3 def initialize(config) @config = config end
Public Instance Methods
map_boot_paths(paths)
click to toggle source
# File lib/jasmine/path_mapper.rb, line 15 def map_boot_paths(paths) map(paths, @config.boot_dir, @config.boot_path) end
map_jasmine_paths(paths)
click to toggle source
# File lib/jasmine/path_mapper.rb, line 19 def map_jasmine_paths(paths) map(paths, @config.jasmine_dir, @config.jasmine_path) end
map_spec_paths(paths)
click to toggle source
# File lib/jasmine/path_mapper.rb, line 11 def map_spec_paths(paths) map(paths, @config.spec_dir, @config.spec_path) end
map_src_paths(paths)
click to toggle source
# File lib/jasmine/path_mapper.rb, line 7 def map_src_paths(paths) map(paths, @config.src_dir, @config.src_path) end
Private Instance Methods
map(paths, remove_path, add_path)
click to toggle source
# File lib/jasmine/path_mapper.rb, line 24 def map(paths, remove_path, add_path) paths.map { |path| File.join(add_path, (path.gsub(remove_path, ''))) } end