Class: Package::Audit::Ruby::GemCollection

Inherits:
Object
  • Object
show all
Defined in:
lib/package/audit/ruby/gem_collection.rb

Instance Method Summary collapse

Constructor Details

#initialize(dir, report) ⇒ GemCollection

Returns a new instance of GemCollection.



10
11
12
13
# File 'lib/package/audit/ruby/gem_collection.rb', line 10

def initialize(dir, report)
  @dir = dir
  @report = report
end

Instance Method Details

#fetchObject



15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/package/audit/ruby/gem_collection.rb', line 15

def fetch
  case @report
  when Enum::Report::DEPRECATED
    deprecated
  when Enum::Report::OUTDATED
    outdated
  when Enum::Report::VULNERABLE
    vulnerable
  else
    all
  end
end