class Awestruct::HandlerChains
Constants
- DEFAULTS
Public Class Methods
new(include_defaults=true)
click to toggle source
# File lib/awestruct/handler_chains.rb, line 23 def initialize(include_defaults=true) @chains = [] self << :defaults if include_defaults # Register our sassc templates begin if require('sassc') || defined?(::Sassc) require 'awestruct/handlers/template/sassc' ::Tilt.register ::Awestruct::Tilt::SassSasscTemplate,'sass' ::Tilt.register ::Awestruct::Tilt::ScssSasscTemplate,'scss' end rescue LoadError # doesn't matter if we can't load it end end
Public Instance Methods
<<(chain)
click to toggle source
# File lib/awestruct/handler_chains.rb, line 43 def <<(chain) @chains += DEFAULTS and return if ( chain == :defaults ) @chains << chain end
[](path)
click to toggle source
# File lib/awestruct/handler_chains.rb, line 39 def[](path) @chains.detect{|e| e.matches?( path.to_s ) } end