Sha256: c7f4eda393a4be89fee7ae761c9d353eaaa4f33ebe734beafe39c324fee2a46e

Contents?: true

Size: 670 Bytes

Versions: 8

Compression:

Stored size: 670 Bytes

Contents

module Octopress
  module AssetPipeline
    class Asset < Ink::Assets::Asset
      def initialize(plugin, file)
        @plugin = plugin
        @file = file
      end

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

      def filename
        File.basename(path)
      end

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

      def destination
        File.join(base, filename)
      end

      def path
        Pathname.new file.path
      end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
octopress-asset-pipeline-2.0.0 lib/octopress-asset-pipeline/assets/asset.rb
octopress-asset-pipeline-1.1.7 lib/octopress-asset-pipeline/assets/asset.rb
octopress-asset-pipeline-1.1.6 lib/octopress-asset-pipeline/assets/local.rb
octopress-asset-pipeline-1.1.5 lib/octopress-asset-pipeline/assets/local.rb
octopress-asset-pipeline-1.1.4 lib/octopress-asset-pipeline/assets/local.rb
octopress-asset-pipeline-1.1.3 lib/octopress-asset-pipeline/assets/local.rb
octopress-asset-pipeline-1.1.2 lib/octopress-asset-pipeline/assets/local.rb
octopress-asset-pipeline-1.1.1 lib/octopress-asset-pipeline/assets/local.rb