Class: WPScan::Finders::ThemeVersion::Base
- Inherits:
-
Object
- Object
- WPScan::Finders::ThemeVersion::Base
- Includes:
- CMSScanner::Finders::UniqueFinder
- Defined in:
- app/finders/theme_version.rb
Overview
Theme Version Finder
Instance Method Summary collapse
-
#initialize(theme) ⇒ Base
constructor
A new instance of Base.
-
#load_specific_finders(theme) ⇒ Object
Load the finders associated with the theme.
Constructor Details
#initialize(theme) ⇒ Base
Returns a new instance of Base.
12 13 14 15 16 17 18 |
# File 'app/finders/theme_version.rb', line 12 def initialize(theme) finders << ThemeVersion::Style.new(theme) << ThemeVersion::WooFrameworkMetaGenerator.new(theme) load_specific_finders(theme) end |
Instance Method Details
#load_specific_finders(theme) ⇒ Object
Load the finders associated with the theme
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'app/finders/theme_version.rb', line 23 def load_specific_finders(theme) module_name = theme.classify_name.to_sym return unless Finders::ThemeVersion.constants.include?(module_name) mod = Finders::ThemeVersion.const_get(module_name) mod.constants.each do |constant| c = mod.const_get(constant) next unless c.is_a?(Class) finders << c.new(theme) end end |