summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2010-06-01 18:10:30 +0000
committermurphy <murphy@rubychan.de>2010-06-01 18:10:30 +0000
commit7284b3674bada6a009bdfa23bd822a6ba6fc4896 (patch)
treeabe6ca1b1be78688e70517ef92ad6e5b7284c7a6
parent5bf55e552d7dc3eac362e2b881afaa8039995a59 (diff)
downloadcoderay-7284b3674bada6a009bdfa23bd822a6ba6fc4896.tar.gz
Cleanups in Encoders::HTML::Output.
-rw-r--r--Changes.textile1
-rw-r--r--lib/coderay/encoders/html.rb4
-rw-r--r--lib/coderay/encoders/html/numbering.rb (renamed from lib/coderay/encoders/html/numerization.rb)8
-rw-r--r--lib/coderay/encoders/html/output.rb2
4 files changed, 5 insertions, 10 deletions
diff --git a/Changes.textile b/Changes.textile
index 99ba2a9..feefb2d 100644
--- a/Changes.textile
+++ b/Changes.textile
@@ -63,6 +63,7 @@ The HTML encoder was cleaned up and simplified.
* *REMOVED* support for @:line_numbers => :list@.
* *FIXED* splitting of lines for @:line_numbers => :inline@, so that the line
numbers don't get colored, too.
+* *RENAMED* @Output#numerize@ to @#number@, which is an actual English word.
h3. @Encoders::LinesOfCode@
diff --git a/lib/coderay/encoders/html.rb b/lib/coderay/encoders/html.rb
index f14c1cc..eed4dfe 100644
--- a/lib/coderay/encoders/html.rb
+++ b/lib/coderay/encoders/html.rb
@@ -111,7 +111,7 @@ module Encoders
:hint => false,
}
- helper :output, :css
+ helper :output, :numbering, :css
attr_reader :css
@@ -233,7 +233,7 @@ module Encoders
@out.extend Output
@out.css = @css
- @out.numerize! options[:line_numbers], options
+ @out.number! options[:line_numbers], options
@out.wrap! options[:wrap]
@out.apply_title! options[:title]
diff --git a/lib/coderay/encoders/html/numerization.rb b/lib/coderay/encoders/html/numbering.rb
index 1590ad0..3a7edce 100644
--- a/lib/coderay/encoders/html/numerization.rb
+++ b/lib/coderay/encoders/html/numbering.rb
@@ -3,13 +3,9 @@ module Encoders
class HTML
- module Output
+ module Output # :nodoc:
- def numerize *args
- clone.numerize!(*args)
- end
-
- def numerize! mode = :table, options = {}
+ def number! mode = :table, options = {}
return self unless mode
options = DEFAULT_OPTIONS.merge options
diff --git a/lib/coderay/encoders/html/output.rb b/lib/coderay/encoders/html/output.rb
index 533235d..dec1d7c 100644
--- a/lib/coderay/encoders/html/output.rb
+++ b/lib/coderay/encoders/html/output.rb
@@ -13,8 +13,6 @@ module Encoders
# TODO: more doc.
module Output
- require 'coderay/encoders/html/numerization.rb'
-
attr_accessor :css
class << self