lib/excesselt/stylesheet.rb in excesselt-1.1.0 vs lib/excesselt/stylesheet.rb in excesselt-1.1.1

- old
+ new

@@ -32,11 +32,11 @@ def rule_for(element) # Look up the rule that is used to render this. # Should fold into stylesheet.rules (collection) .find(:matches?, element) # TODO: Patch enumerable#find etc to take a plain symbol and some arguments? rule = get_rules.find {|rule| rule.matches? element } - rule or raise "There is no style defined to handle element #{element.node.name} in this context (element.node.parents.inspect)" + rule or raise "There is no style defined to handle element '#{element.name}' in this context (#{element.ancestors.map(&:name).reverse.join(", ")})" end def helper(*mods, &block) @helper_modules.push(mods).flatten! block.call @@ -62,6 +62,6 @@ end mappings end end -end \ No newline at end of file +end