Browse Source

Move autoloads into OptionContainer

This seems like a better place for them to live
James Lee 4 years ago
parent
commit
d67f7a21d9
No account linked to committer's email address
2 changed files with 15 additions and 14 deletions
  1. 0
    13
      lib/msf/core/opt_base.rb
  2. 15
    1
      lib/msf/core/option_container.rb

+ 0
- 13
lib/msf/core/opt_base.rb View File

@@ -5,19 +5,6 @@ require 'rex/socket'
5 5
 
6 6
 module Msf
7 7
 
8
-  autoload :Opt, 'msf/core/opt'
9
-
10
-  autoload :OptAddress, 'msf/core/opt_address'
11
-  autoload :OptAddressRange, 'msf/core/opt_address_range'
12
-  autoload :OptBool, 'msf/core/opt_bool'
13
-  autoload :OptEnum, 'msf/core/opt_enum'
14
-  autoload :OptInt, 'msf/core/opt_int'
15
-  autoload :OptPath, 'msf/core/opt_path'
16
-  autoload :OptPort, 'msf/core/opt_port'
17
-  autoload :OptRaw, 'msf/core/opt_raw'
18
-  autoload :OptRegexp, 'msf/core/opt_regexp'
19
-  autoload :OptString, 'msf/core/opt_string'
20
-
21 8
   ###
22 9
   #
23 10
   # The base class for all options.

+ 15
- 1
lib/msf/core/option_container.rb View File

@@ -1,7 +1,21 @@
1 1
 # -*- coding: binary -*-
2 2
 
3 3
 module Msf
4
-  require 'msf/core/opt_base'
4
+
5
+  autoload :Opt, 'msf/core/opt'
6
+
7
+  autoload :OptBase, 'msf/core/opt_base'
8
+
9
+  autoload :OptAddress, 'msf/core/opt_address'
10
+  autoload :OptAddressRange, 'msf/core/opt_address_range'
11
+  autoload :OptBool, 'msf/core/opt_bool'
12
+  autoload :OptEnum, 'msf/core/opt_enum'
13
+  autoload :OptInt, 'msf/core/opt_int'
14
+  autoload :OptPath, 'msf/core/opt_path'
15
+  autoload :OptPort, 'msf/core/opt_port'
16
+  autoload :OptRaw, 'msf/core/opt_raw'
17
+  autoload :OptRegexp, 'msf/core/opt_regexp'
18
+  autoload :OptString, 'msf/core/opt_string'
5 19
 
6 20
   #
7 21
   # The options purpose in life is to associate named options with arbitrary

Loading…
Cancel
Save