lib/octopress-asset-pipeline/assets/asset.rb in octopress-asset-pipeline-2.0.0 vs lib/octopress-asset-pipeline/assets/asset.rb in octopress-asset-pipeline-2.0.1

- old
+ new

@@ -1,11 +1,14 @@ module Octopress module AssetPipeline class Asset < Ink::Assets::Asset - def initialize(plugin, file) + attr_reader :file_object + + def initialize(plugin, object) @plugin = plugin - @file = file + @file_object = object + @file = object.path end def info message = filename.ljust(35) message += "from: #{base}" @@ -15,18 +18,18 @@ def filename File.basename(path) end def base - file.relative_path.sub(filename,'').sub(/^\/(.+)\/$/,'\1') + file_object.relative_path.sub(filename,'').sub(/^\/(.+)\/$/,'\1') end def destination File.join(base, filename) end def path - Pathname.new file.path + file end # Copy is unncessary with local assets # def copy(target_dir); end