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.
Class Method Summary collapse
Instance Method Summary collapse
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 |
Class Method Details
.between(current, recorded) ⇒ Object
6 7 8 |
# File 'lib/hashira/ci/diff.rb', line 6 def self.between(current, recorded) new(added: current - recorded, removed: recorded - current) end |
Instance Method Details
#empty? ⇒ Boolean
10 |
# File 'lib/hashira/ci/diff.rb', line 10 def empty? = added.empty? && removed.empty? |
#worse? ⇒ Boolean
12 |
# File 'lib/hashira/ci/diff.rb', line 12 def worse? = !added.empty? |