Sha256: 898c16232000509256286208f0acf7d688bd9230b2b5c0b9be4527f645553d9c

Contents?: true

Size: 629 Bytes

Versions: 3

Compression:

Stored size: 629 Bytes

Contents

module MasterView
  module Directives

    #creates a link_to
    class Stylesheet_link < MasterView::DirectiveBase

      # /public\/stylesheets\/(.*)/
      STYLESHEET_SRC_EXTRACT_REGEX = MasterView::ConfigSettings.template_asset_base_ref_pattern[:stylesheets] 

      def stag(dcs)
      end

      def etag(dcs)
        src = attrs_lck['src']
        if attr_value.empty? && src
          match = STYLESHEET_SRC_EXTRACT_REGEX.match(src)
          ss_loc = (match) ? match[1] : src
        else
          ss_loc = attr_value
        end
        erb_content('stylesheet_link_tag ' + quote(ss_loc))
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
masterview-0.2.3 lib/masterview/directives/stylesheet_link.rb
masterview-0.2.4 lib/masterview/directives/stylesheet_link.rb
masterview-0.2.5 lib/masterview/directives/stylesheet_link.rb