Class: Shh::Command::CommitChanges

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(repository, io) ⇒ CommitChanges

Returns a new instance of CommitChanges.



4
5
6
7
8
# File 'lib/shh/command/commit_changes.rb', line 4

def initialize repository, io
  @io, @repository = io, repository
  @help = "Commits all pending changes to vcs (note that this will add _all_ pending changes not only cards)"
  @usage = "<commit message>"
end

Instance Attribute Details

#helpObject (readonly)

Returns the value of attribute help.



2
3
4
# File 'lib/shh/command/commit_changes.rb', line 2

def help
  @help
end

Instance Method Details

#execute(text = nil) ⇒ Object



10
11
12
# File 'lib/shh/command/commit_changes.rb', line 10

def execute text=nil
  @repository.addremovecommit text
end