Class: Hashira::CI::Diff
- Inherits:
-
Data
- Object
- Data
- Hashira::CI::Diff
- Defined in:
- lib/hashira/ci/diff.rb
Instance Attribute Summary collapse
-
#added ⇒ Object
readonly
Returns the value of attribute added.
-
#removed ⇒ Object
readonly
Returns the value of attribute removed.
-
#worsened ⇒ Object
readonly
Returns the value of attribute worsened.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(worsened: []) ⇒ Diff
constructor
A new instance of Diff.
- #worse? ⇒ Boolean
Constructor Details
#initialize(worsened: []) ⇒ Diff
Returns a new instance of Diff.
7 |
# File 'lib/hashira/ci/diff.rb', line 7 def initialize(worsened: [], **) = super |
Instance Attribute Details
#added ⇒ Object (readonly)
Returns the value of attribute added
5 6 7 |
# File 'lib/hashira/ci/diff.rb', line 5 def added @added end |
#removed ⇒ Object (readonly)
Returns the value of attribute removed
5 6 7 |
# File 'lib/hashira/ci/diff.rb', line 5 def removed @removed end |
#worsened ⇒ Object (readonly)
Returns the value of attribute worsened
5 6 7 |
# File 'lib/hashira/ci/diff.rb', line 5 def worsened @worsened end |
Instance Method Details
#empty? ⇒ Boolean
8 |
# File 'lib/hashira/ci/diff.rb', line 8 def empty? = added.empty? && removed.empty? && worsened.empty? |
#worse? ⇒ Boolean
9 |
# File 'lib/hashira/ci/diff.rb', line 9 def worse? = !added.empty? || !worsened.empty? |