lib/rouge/util.rb in rouge-0.2.0 vs lib/rouge/util.rb in rouge-0.2.1
- old
+ new
@@ -1,5 +1,15 @@
module Rouge
+ class Yielder
+ def initialize(&pr)
+ @proc = pr
+ end
+
+ def <<(*a)
+ @proc && @proc.call(*a)
+ end
+ end
+
class InheritableHash < Hash
def initialize(parent=nil)
@parent = parent
end