Class: Cardigan::Command::CommitChanges

Inherits:
Object
  • Object
show all
Defined in:
lib/cardigan/command/commit_changes.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository, io) ⇒ CommitChanges

Returns a new instance of CommitChanges.



6
7
8
9
10
# File 'lib/cardigan/command/commit_changes.rb', line 6

def initialize repository, io
  @io, @repository = io, repository
  @usage = "<commit message>"
  @help = "Commits _all_ changes (adds, removes and modifications) to the source control system\nWarning: Use with caution. This will not only commit changes to cards - all modifications will be committed."
end

Instance Attribute Details

#helpObject (readonly)

Returns the value of attribute help.



4
5
6
# File 'lib/cardigan/command/commit_changes.rb', line 4

def help
  @help
end

#usageObject (readonly)

Returns the value of attribute usage.



4
5
6
# File 'lib/cardigan/command/commit_changes.rb', line 4

def usage
  @usage
end

Instance Method Details

#execute(text = nil) ⇒ Object



12
13
14
# File 'lib/cardigan/command/commit_changes.rb', line 12

def execute text=nil
  @repository.addremovecommit text
end