Class: RubyAudit::Scanner
- Inherits:
-
Bundler::Audit::Scanner
- Object
- Bundler::Audit::Scanner
- RubyAudit::Scanner
- Defined in:
- lib/ruby_audit/scanner.rb
Defined Under Namespace
Classes: Version
Instance Method Summary collapse
-
#initialize ⇒ Scanner
constructor
A new instance of Scanner.
- #scan(options = {}, &block) ⇒ Object
- #scan_ruby(options = {}, &block) ⇒ Object
- #scan_rubygems(options = {}, &block) ⇒ Object
Constructor Details
Instance Method Details
#scan(options = {}, &block) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/ruby_audit/scanner.rb', line 16 def scan( = {}, &block) return enum_for(__method__, ) unless block scan_ruby(, &block) scan_rubygems(, &block) self end |
#scan_ruby(options = {}, &block) ⇒ Object
25 26 27 28 29 30 31 32 33 |
# File 'lib/ruby_audit/scanner.rb', line 25 def scan_ruby( = {}, &block) version = if RUBY_PATCHLEVEL < 0 ruby_version else "#{RUBY_VERSION}.#{RUBY_PATCHLEVEL}" end specs = [Version.new(RUBY_ENGINE, version)] scan_inner(specs, 'ruby', , &block) end |