Class: Kennel::Syncer::Plan

Inherits:
Struct
  • Object
show all
Defined in:
lib/kennel/syncer/plan.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#changesObject



7
8
9
# File 'lib/kennel/syncer/plan.rb', line 7

def changes
  @changes || (deletes + creates + updates).map(&:change) # roughly ordered in the way that update works
end

#createsObject

Returns the value of attribute creates

Returns:

  • (Object)

    the current value of creates



4
5
6
# File 'lib/kennel/syncer/plan.rb', line 4

def creates
  @creates
end

#deletesObject

Returns the value of attribute deletes

Returns:

  • (Object)

    the current value of deletes



4
5
6
# File 'lib/kennel/syncer/plan.rb', line 4

def deletes
  @deletes
end

#updatesObject

Returns the value of attribute updates

Returns:

  • (Object)

    the current value of updates



4
5
6
# File 'lib/kennel/syncer/plan.rb', line 4

def updates
  @updates
end

Instance Method Details

#empty?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/kennel/syncer/plan.rb', line 11

def empty?
  (creates + updates + deletes).empty?
end