summaryrefslogtreecommitdiff
path: root/lib/coderay/scanners.rb
diff options
context:
space:
mode:
authorKornelius Kalnbach <murphy@rubychan.de>2016-02-13 17:14:48 +0100
committerKornelius Kalnbach <murphy@rubychan.de>2016-02-13 17:14:48 +0100
commit5cc8c52f7ca0dc31eb85d065579d66dd0f0cd540 (patch)
tree47682e4141e1c52d888281cb3dd9a6a57f6e0513 /lib/coderay/scanners.rb
parent0ad3ddc26da51b3bdd0454859f894761a0155c1b (diff)
parent12a467ca21faad604655d5f2e7b87b42d7a30b4a (diff)
downloadcoderay-5cc8c52f7ca0dc31eb85d065579d66dd0f0cd540.tar.gz
Merge pull request #190 from rubychan/autoload
Cleanup Folder structure
Diffstat (limited to 'lib/coderay/scanners.rb')
-rw-r--r--lib/coderay/scanners.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/coderay/scanners.rb b/lib/coderay/scanners.rb
new file mode 100644
index 0000000..3c7e594
--- /dev/null
+++ b/lib/coderay/scanners.rb
@@ -0,0 +1,27 @@
+require 'strscan'
+
+module CodeRay
+
+ autoload :WordList, coderay_path('helpers', 'word_list')
+
+ # = Scanners
+ #
+ # This module holds the Scanner class and its subclasses.
+ # For example, the Ruby scanner is named CodeRay::Scanners::Ruby
+ # can be found in coderay/scanners/ruby.
+ #
+ # Scanner also provides methods and constants for the register
+ # mechanism and the [] method that returns the Scanner class
+ # belonging to the given lang.
+ #
+ # See PluginHost.
+ module Scanners
+
+ extend PluginHost
+ plugin_path File.dirname(__FILE__), 'scanners'
+
+ autoload :Scanner, CodeRay.coderay_path('scanners', 'scanner')
+
+ end
+
+end