Class: Repository::HardReset
- Inherits:
-
Object
- Object
- Repository::HardReset
- Defined in:
- lib/repository/hard_reset.rb
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(repo, oid) ⇒ HardReset
constructor
A new instance of HardReset.
Constructor Details
#initialize(repo, oid) ⇒ HardReset
Returns a new instance of HardReset.
6 7 8 9 |
# File 'lib/repository/hard_reset.rb', line 6 def initialize(repo, oid) @repo = repo @oid = oid end |
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 |
# File 'lib/repository/hard_reset.rb', line 11 def execute @status = @repo.status(@oid) changed = @status.changed.map { |path| Pathname.new(path) } changed.each { |path| reset_path(path) } end |