lib/coderay.rb in coderay-1.0.9 vs lib/coderay.rb in coderay-1.1.0.rc1

- old
+ new

@@ -125,18 +125,18 @@ # CodeRay::Duo for the most convenient (and recommended) interface. module CodeRay $CODERAY_DEBUG ||= false - CODERAY_PATH = File.join File.dirname(__FILE__), 'coderay' + CODERAY_PATH = File.expand_path('../coderay', __FILE__) # Assuming the path is a subpath of lib/coderay/ def self.coderay_path *path File.join CODERAY_PATH, *path end - require coderay_path('version') + require 'coderay/version' # helpers autoload :FileType, coderay_path('helpers', 'file_type') # Tokens @@ -164,10 +164,9 @@ # require 'coderay' # page = CodeRay.scan("puts 'Hello, world!'", :ruby).html # # See also demo/demo_simple. def scan code, lang, options = {}, &block - # FIXME: return a proxy for direct-stream encoding TokensProxy.new code, lang, options, block end # Scans +filename+ (a path to a code file) with the Scanner for +lang+. #