Sha256: 172b8cb511e29bd3a02e56a24e2e269c4e4c6912f26e2e4c5689ea8e272cb9a1

Contents?: true

Size: 775 Bytes

Versions: 2

Compression:

Stored size: 775 Bytes

Contents

module Octopress
  module Ink
    module Assets
      class Stylesheet < Asset
        def initialize(plugin, type, file, media)
          @plugin = plugin
          @file = file
          @type = type
          @media = media || 'all'
          @root = plugin.assets_path
          @dir = File.join(plugin.slug, type)
          @exists = {}
          file_check
        end

        def media
          m = @media
          if @file =~ /@(.+?)\./
            m = $1
          end
          m
        end

        def destination
          File.join(@dir, @file.sub(/@(.+?)\./,'.'))
        end

        def tag
          "<link href='#{Filters.expand_url(File.join(@dir, @file))}' media='#{media}' rel='stylesheet' type='text/css'>"
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
octopress-ink-1.0.0.alpha.33 lib/octopress-ink/assets/stylesheet.rb
octopress-ink-1.0.0.alpha.32 lib/octopress-ink/assets/stylesheet.rb