Sha256: 35e9d051ffd71fcd4581e7380fa2eeb701ca75585c29cf1983717356440668f3
Contents?: true
Size: 1.01 KB
Versions: 15
Compression:
Stored size: 1.01 KB
Contents
# encoding: UTF-8 module Spontaneous::Output module Helpers # Helpers needs a separate helper registration mechanism outside of the Site scope # because loading of these modules happens before we instantiate the site object. # I don't want to pass calls to Site.register_helper here because Site based helpers # should be disposed of with the Site instance whereas these core helpers should persist def self.register_helper(helper_module, *formats) if formats.empty? registered_helpers[:*] << helper_module else formats.each do |format| registered_helpers[format.to_sym] << helper_module end end end def self.registered_helpers @registered_helpers ||= Hash.new { |hash, key| hash[key] = [] } end require 'spontaneous/output/helpers/stylesheet_helper' require 'spontaneous/output/helpers/script_helper' require 'spontaneous/output/helpers/classes_helper' require 'spontaneous/output/helpers/conditional_comment_helper' end end
Version data entries
15 entries across 15 versions & 1 rubygems