Class: Envo::State::Patch
- Inherits:
-
Object
- Object
- Envo::State::Patch
- Defined in:
- lib/envo/state.rb
Instance Attribute Summary collapse
-
#added ⇒ Object
readonly
Returns the value of attribute added.
-
#changed ⇒ Object
readonly
Returns the value of attribute changed.
-
#removed ⇒ Object
readonly
Returns the value of attribute removed.
Instance Method Summary collapse
- #empty? ⇒ Boolean
-
#initialize(removed = [], changed = {}, added = {}) ⇒ Patch
constructor
A new instance of Patch.
Constructor Details
#initialize(removed = [], changed = {}, added = {}) ⇒ Patch
Returns a new instance of Patch.
36 37 38 39 40 |
# File 'lib/envo/state.rb', line 36 def initialize(removed = [], changed = {}, added = {}) @removed = removed @changed = changed @added = added end |
Instance Attribute Details
#added ⇒ Object (readonly)
Returns the value of attribute added.
46 47 48 |
# File 'lib/envo/state.rb', line 46 def added @added end |
#changed ⇒ Object (readonly)
Returns the value of attribute changed.
46 47 48 |
# File 'lib/envo/state.rb', line 46 def changed @changed end |
#removed ⇒ Object (readonly)
Returns the value of attribute removed.
46 47 48 |
# File 'lib/envo/state.rb', line 46 def removed @removed end |
Instance Method Details
#empty? ⇒ Boolean
42 43 44 |
# File 'lib/envo/state.rb', line 42 def empty? @removed.empty? && @changed.empty? && @added.empty? end |