module AssetHelper

Public Instance Methods

asset_path(*path) click to toggle source
# File lib/punt/helper/asset_helper.rb, line 14
def asset_path(*path)
    return File.join(File.dirname(__FILE__), "..", "..", "..", "assets", path)
end
copy_without_overwriting(src: nil, dst: nil) click to toggle source
# File lib/punt/helper/asset_helper.rb, line 2
def copy_without_overwriting(src: nil, dst: nil)
    FileUtils.cp(src_path(src), dst_path(dst)) unless File.exists?(dst_path(dst))
end
dst_path(*asset) click to toggle source
# File lib/punt/helper/asset_helper.rb, line 10
def dst_path(*asset)
    File.join(asset)
end
src_path(*asset) click to toggle source
# File lib/punt/helper/asset_helper.rb, line 6
def src_path(*asset)
    asset_path(asset)
end