Class: HelixSync::Methods::Plan

Inherits:
Object
  • Object
show all
Defined in:
lib/helix_sync/methods.rb

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Constructor Details

- (Plan) initialize

Returns a new instance of Plan



526
527
528
# File 'lib/helix_sync/methods.rb', line 526

def initialize
  @subplans = []
end

Instance Attribute Details

- (Object) subplans

Array of Subplan instances



524
525
526
# File 'lib/helix_sync/methods.rb', line 524

def subplans
  @subplans
end

Instance Method Details

- (Boolean) empty?

Returns:

  • (Boolean)


530
531
532
# File 'lib/helix_sync/methods.rb', line 530

def empty?
  @subplans.empty?
end

- (Object) readd_actions



538
539
540
# File 'lib/helix_sync/methods.rb', line 538

def readd_actions
  @subplans.select { |s| s.sync_conflict == 'readd' }
end

- (Object) remove_actions



534
535
536
# File 'lib/helix_sync/methods.rb', line 534

def remove_actions
  @subplans.select { |s| s.sync_conflict == 'remove' }
end

- (Object) resolve_actions



542
543
544
# File 'lib/helix_sync/methods.rb', line 542

def resolve_actions
  @subplans.select { |s| s.sync_conflict == 'resolve' }
end

- (Object) to_json



546
547
548
# File 'lib/helix_sync/methods.rb', line 546

def to_json
  @subplans.to_json
end