Class: Cardigan::Command::CommitChanges
- Inherits:
-
Object
- Object
- Cardigan::Command::CommitChanges
- Defined in:
- lib/cardigan/command/commit_changes.rb
Instance Attribute Summary collapse
-
#help ⇒ Object
readonly
Returns the value of attribute help.
-
#usage ⇒ Object
readonly
Returns the value of attribute usage.
Instance Method Summary collapse
- #execute(text = nil) ⇒ Object
-
#initialize(repository, io) ⇒ CommitChanges
constructor
A new instance of CommitChanges.
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
#help ⇒ Object (readonly)
Returns the value of attribute help.
4 5 6 |
# File 'lib/cardigan/command/commit_changes.rb', line 4 def help @help end |
#usage ⇒ Object (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 |