Class: GemCollection
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- GemCollection
- Defined in:
- lib/gem_checks/gem_collection.rb
Defined Under Namespace
Classes: EmptyGemCollection
Class Method Summary collapse
Instance Method Summary collapse
- #display_vulnerable ⇒ Object
-
#initialize(collection) ⇒ GemCollection
constructor
A new instance of GemCollection.
Constructor Details
#initialize(collection) ⇒ GemCollection
Returns a new instance of GemCollection.
3 4 5 6 |
# File 'lib/gem_checks/gem_collection.rb', line 3 def initialize(collection) @collection = collection super(collection) end |
Class Method Details
.wrap(collection) ⇒ Object
15 16 17 |
# File 'lib/gem_checks/gem_collection.rb', line 15 def self.wrap(collection) collection.empty? ? EmptyGemCollection.new : new(collection) end |
Instance Method Details
#display_vulnerable ⇒ Object
8 9 10 11 12 13 |
# File 'lib/gem_checks/gem_collection.rb', line 8 def display_vulnerable collection.each do |gem| puts (gem) end self end |