From 8f8d029f1e9ba286e43cedc274a89bae3fb318b4 Mon Sep 17 00:00:00 2001 From: murphy Date: Tue, 30 Mar 2010 01:13:11 +0000 Subject: Added documentation to encoders; more code cleanups. --- lib/coderay/encoders/html/css.rb | 6 +++--- lib/coderay/encoders/html/output.rb | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/coderay/encoders/html') diff --git a/lib/coderay/encoders/html/css.rb b/lib/coderay/encoders/html/css.rb index 03c2634..05e4fa4 100644 --- a/lib/coderay/encoders/html/css.rb +++ b/lib/coderay/encoders/html/css.rb @@ -2,7 +2,7 @@ module CodeRay module Encoders class HTML - class CSS + class CSS # :nodoc: attr :stylesheet @@ -24,10 +24,10 @@ module Encoders cl = @classes[styles.first] return '' unless cl style = '' - 1.upto(styles.size) do |offset| + 1.upto styles.size do |offset| break if style = cl[styles[offset .. -1]] end - $stderr.puts 'Style not found: %p' % [styles] if $DEBUG and style.empty? + # warn 'Style not found: %p' % [styles] if style.empty? return style end diff --git a/lib/coderay/encoders/html/output.rb b/lib/coderay/encoders/html/output.rb index 28574a5..57d2e88 100644 --- a/lib/coderay/encoders/html/output.rb +++ b/lib/coderay/encoders/html/output.rb @@ -126,7 +126,7 @@ module Encoders Output.make_stylesheet @css, in_tag end - class Template < String + class Template < String # :nodoc: def self.wrap! str, template, target target = Regexp.new(Regexp.escape("<%#{target}%>")) @@ -147,7 +147,7 @@ module Encoders end end - module Simple + module Simple # :nodoc: def ` str #` <-- for stupid editors Template.new str end -- cgit v1.2.1