lib/octopress-ink/assets/stylesheet.rb in octopress-ink-1.0.0.alpha.31 vs lib/octopress-ink/assets/stylesheet.rb in octopress-ink-1.0.0.alpha.32

- old
+ new

@@ -1,32 +1,34 @@ module Octopress - 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.namespace, type) - @exists = {} - file_check - end + 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 + def media + m = @media + if @file =~ /@(.+?)\./ + m = $1 + end + m end - m - end - def destination - File.join(@dir, @file.sub(/@(.+?)\./,'.')) - 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'>" + def tag + "<link href='#{Filters.expand_url(File.join(@dir, @file))}' media='#{media}' rel='stylesheet' type='text/css'>" + end end end end end