Class: Envo::State::Patch

Inherits:
Object
  • Object
show all
Defined in:
lib/envo/state.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#addedObject (readonly)

Returns the value of attribute added.



46
47
48
# File 'lib/envo/state.rb', line 46

def added
  @added
end

#changedObject (readonly)

Returns the value of attribute changed.



46
47
48
# File 'lib/envo/state.rb', line 46

def changed
  @changed
end

#removedObject (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

Returns:

  • (Boolean)


42
43
44
# File 'lib/envo/state.rb', line 42

def empty?
  @removed.empty? && @changed.empty? && @added.empty?
end