@@ -46,7 +46,7 @@ def self.setup(options)
46
46
}
47
47
options = defaults . merge ( options )
48
48
49
- @@ target_class = options [ :target_class ]
49
+ target_class = options [ :target_class ]
50
50
@@mount_path = options [ :mount_path ]
51
51
@@class_name = options [ :class_name ] || options [ :mount_path ] . gsub ( '/' , '' )
52
52
@@markdown = options [ :markdown ]
@@ -59,7 +59,7 @@ def self.setup(options)
59
59
get @@mount_path do
60
60
header [ 'Access-Control-Allow-Origin' ] = '*'
61
61
header [ 'Access-Control-Request-Method' ] = '*'
62
- routes = @@ target_class ::combined_routes
62
+ routes = target_class ::combined_routes
63
63
64
64
if @@hide_documentation_path
65
65
routes . reject! { |route , value | "/#{ route } /" . index ( parse_path ( @@mount_path , nil ) << '/' ) == 0 }
@@ -87,8 +87,8 @@ def self.setup(options)
87
87
header [ 'Access-Control-Allow-Origin' ] = '*'
88
88
header [ 'Access-Control-Request-Method' ] = '*'
89
89
models = [ ]
90
- routes = @@ target_class ::combined_routes [ params [ :name ] ]
91
- routes_array = routes . map { |route |
90
+ routes = target_class ::combined_routes [ params [ :name ] ]
91
+ routes_array = routes . map { |route |
92
92
next if route . route_hidden
93
93
notes = route . route_notes && @@markdown ? Kramdown ::Document . new ( strip_heredoc ( route . route_notes ) ) . to_html : route . route_notes
94
94
http_codes = parse_http_codes route . route_http_codes
0 commit comments