Sha256: 4d3181adcf670bc6f353dc0f424c033b2b6bda47d6e3f30bec834782842b4290

Contents?: true

Size: 730 Bytes

Versions: 6

Compression:

Stored size: 730 Bytes

Contents

module Octopress
  module AssetPipeline
    class Asset < Ink::Assets::Asset
      attr_reader :file_object

      def initialize(plugin, object)
        @plugin = plugin
        @file_object = object
        @file = object.path
      end

      def info
        message = filename.ljust(35)
        message += "from: #{base}"
        "  - #{message}"
      end

      def filename
        File.basename(path)
      end

      def base
        file_object.relative_path.sub(filename,'').sub(/^\/(.+)\/$/,'\1')
      end

      def destination
        File.join(base, filename)
      end

      def path
        file
      end

      # Copy is unncessary with local assets
      #
      def copy(target_dir); end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
octopress-asset-pipeline-2.0.6 lib/octopress-asset-pipeline/assets/asset.rb
octopress-asset-pipeline-2.0.5 lib/octopress-asset-pipeline/assets/asset.rb
octopress-asset-pipeline-2.0.4 lib/octopress-asset-pipeline/assets/asset.rb
octopress-asset-pipeline-2.0.3 lib/octopress-asset-pipeline/assets/asset.rb
octopress-asset-pipeline-2.0.2 lib/octopress-asset-pipeline/assets/asset.rb
octopress-asset-pipeline-2.0.1 lib/octopress-asset-pipeline/assets/asset.rb