Class: Basketcase::AutoUncheckoutCommand

Inherits:
AutoCommand show all
Defined in:
lib/basketcase.rb

Instance Attribute Summary

Attributes inherited from Command

#comment, #listener, #targets

Instance Method Summary collapse

Methods inherited from AutoCommand

#each_element, #find_checkouts

Methods inherited from Command

#accept_args, #effective_targets, #initialize, #option_comment, #option_graphical, #option_recurse, #report, #specified_targets

Methods included from Utils

#mkpath

Constructor Details

This class inherits a constructor from Basketcase::Command

Instance Method Details

#executeObject



584
585
586
587
588
589
590
591
# File 'lib/basketcase.rb', line 584

def execute
  checked_out_elements = find_checkouts
  if checked_out_elements.empty?
    puts "Nothing to revert"
    return
  end
  run(UncheckoutCommand, '-r', *checked_out_elements)
end

#helpObject



578
579
580
581
582
# File 'lib/basketcase.rb', line 578

def help
  <<EOF
Bulk revert: revert all checked-out elements.
EOF
end

#synopsisObject



574
575
576
# File 'lib/basketcase.rb', line 574

def synopsis
  "[<element> ...]"
end