Skip to content

Commit 738aae5

Browse files
committed
fix autoloading of DSL scanners
1 parent 579c00b commit 738aae5

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

lib/coderay.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,6 @@ def self.coderay_path *path
153153
autoload :Encoders, coderay_path('encoders')
154154
autoload :Styles, coderay_path('styles')
155155

156-
# DSL Scanner
157-
autoload :RuleBasedScanner, coderay_path('rule_based_scanner')
158-
autoload :SingleStateRuleBasedScanner, coderay_path('single_state_rule_based_scanner')
159-
autoload :StateBasedScanner, coderay_path('state_based_scanner')
160-
161156
# convenience access and reusable Encoder/Scanner pair
162157
autoload :Duo, coderay_path('duo')
163158

lib/coderay/scanners.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ module Scanners
2121
plugin_path File.dirname(__FILE__), 'scanners'
2222

2323
autoload :Scanner, CodeRay.coderay_path('scanners', 'scanner')
24+
25+
# DSL Scanners
26+
autoload :RuleBasedScanner, CodeRay.coderay_path('rule_based_scanner')
27+
autoload :SingleStateRuleBasedScanner, CodeRay.coderay_path('single_state_rule_based_scanner')
28+
autoload :StateBasedScanner, CodeRay.coderay_path('state_based_scanner')
29+
autoload :SimpleScanner, CodeRay.coderay_path('simple_scanner')
2430

2531
end
2632

lib/coderay/simple_scanner.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
require 'set'
2+
require 'coderay/simple_scanner_dsl'
23

34
module CodeRay
45
module Scanners

0 commit comments

Comments
 (0)