Sha256: 828cdbb1d4ad6caa67db46b1ecea153810cc78508f0421820b65dbf1c51015bd

Contents?: true

Size: 636 Bytes

Versions: 4

Compression:

Stored size: 636 Bytes

Contents

# encoding: UTF-8

require 'sass'

module Spontaneous::Output::Helpers
  module StylesheetHelper
    extend self

    def stylesheets(*args)
      stylesheet_urls(*args).map { |stylesheet|
        stylesheet_tag(stylesheet)
      }.join("\n")
    end

    def stylesheet_urls(*args)
      options = args.extract_options!
      options.update(:development => development?)
      asset_environment.css(args.flatten, options)
    end

    alias_method :stylesheet, :stylesheets

    def stylesheet_tag(href)
      %(<link rel="stylesheet" href="#{href}" />)
    end

    Spontaneous::Output::Helpers.register_helper(self, :html)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spontaneous-0.2.0.beta5 lib/spontaneous/output/helpers/stylesheet_helper.rb
spontaneous-0.2.0.beta4 lib/spontaneous/output/helpers/stylesheet_helper.rb
spontaneous-0.2.0.beta3 lib/spontaneous/output/helpers/stylesheet_helper.rb
spontaneous-0.2.0.beta2 lib/spontaneous/output/helpers/stylesheet_helper.rb