Class: StillActive::Suppressions::Entry
- Inherits:
-
Struct
- Object
- Struct
- StillActive::Suppressions::Entry
- Defined in:
- lib/still_active/suppressions.rb
Instance Attribute Summary collapse
-
#advisory ⇒ Object
Returns the value of attribute advisory.
-
#expires ⇒ Object
Returns the value of attribute expires.
-
#gem ⇒ Object
Returns the value of attribute gem.
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#signal ⇒ Object
Returns the value of attribute signal.
Instance Method Summary collapse
Instance Attribute Details
#advisory ⇒ Object
Returns the value of attribute advisory
20 21 22 |
# File 'lib/still_active/suppressions.rb', line 20 def advisory @advisory end |
#expires ⇒ Object
Returns the value of attribute expires
20 21 22 |
# File 'lib/still_active/suppressions.rb', line 20 def expires @expires end |
#gem ⇒ Object
Returns the value of attribute gem
20 21 22 |
# File 'lib/still_active/suppressions.rb', line 20 def gem @gem end |
#reason ⇒ Object
Returns the value of attribute reason
20 21 22 |
# File 'lib/still_active/suppressions.rb', line 20 def reason @reason end |
#signal ⇒ Object
Returns the value of attribute signal
20 21 22 |
# File 'lib/still_active/suppressions.rb', line 20 def signal @signal end |
Instance Method Details
#covers?(signal:, advisory:, aliases:) ⇒ Boolean
29 30 31 32 33 34 35 36 37 |
# File 'lib/still_active/suppressions.rb', line 29 def covers?(signal:, advisory:, aliases:) return true if whole_gem? if self.signal == :vulnerability [advisory, *aliases].compact.include?(self.advisory) else self.signal == signal end end |
#expired?(today) ⇒ Boolean
25 26 27 |
# File 'lib/still_active/suppressions.rb', line 25 def expired?(today) !expires.nil? && expires < today end |
#whole_gem? ⇒ Boolean
21 22 23 |
# File 'lib/still_active/suppressions.rb', line 21 def whole_gem? signal.nil? && advisory.nil? end |