summaryrefslogtreecommitdiff
path: root/lib/coderay/encoders.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/encoders.rb
parent0ad3ddc26da51b3bdd0454859f894761a0155c1b (diff)
parent12a467ca21faad604655d5f2e7b87b42d7a30b4a (diff)
downloadcoderay-5cc8c52f7ca0dc31eb85d065579d66dd0f0cd540.tar.gz
Merge pull request #190 from rubychan/autoload
Cleanup Folder structure
Diffstat (limited to 'lib/coderay/encoders.rb')
-rw-r--r--lib/coderay/encoders.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/coderay/encoders.rb b/lib/coderay/encoders.rb
new file mode 100644
index 0000000..6599186
--- /dev/null
+++ b/lib/coderay/encoders.rb
@@ -0,0 +1,18 @@
+module CodeRay
+
+ # This module holds the Encoder class and its subclasses.
+ # For example, the HTML encoder is named CodeRay::Encoders::HTML
+ # can be found in coderay/encoders/html.
+ #
+ # Encoders also provides methods and constants for the register
+ # mechanism and the [] method that returns the Encoder class
+ # belonging to the given format.
+ module Encoders
+
+ extend PluginHost
+ plugin_path File.dirname(__FILE__), 'encoders'
+
+ autoload :Encoder, CodeRay.coderay_path('encoders', 'encoder')
+
+ end
+end