diff options
author | murphy <murphy@rubychan.de> | 2011-06-17 23:13:24 +0000 |
---|---|---|
committer | murphy <murphy@rubychan.de> | 2011-06-17 23:13:24 +0000 |
commit | 90f70ee61e87e137aa192c5db97c382e1ec7d24b (patch) | |
tree | a9d5e9c7e0664faaada8d99741679d0bb8f6403c /lib/coderay.rb | |
parent | 4c8b5dac9d881b916a49e20401659bf107168e0b (diff) | |
download | coderay-90f70ee61e87e137aa192c5db97c382e1ec7d24b.tar.gz |
issue #45: new command line interface!
Diffstat (limited to 'lib/coderay.rb')
-rw-r--r-- | lib/coderay.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/coderay.rb b/lib/coderay.rb index 60dcfd0..9b81772 100644 --- a/lib/coderay.rb +++ b/lib/coderay.rb @@ -134,6 +134,9 @@ module CodeRay # Revision: Subversion Revision number (generated on rake gem:make) VERSION = '1.0.0' + # helpers + autoload :FileType, 'coderay/helpers/file_type' + # Tokens autoload :Tokens, 'coderay/tokens' autoload :TokenKinds, 'coderay/token_kinds' @@ -178,7 +181,6 @@ module CodeRay def scan_file filename, lang = :auto, options = {}, &block file = IO.read filename if lang == :auto - require 'coderay/helpers/file_type' lang = FileType.fetch filename, :text, true end scan file, lang, options = {}, &block |