Sha256: 7a045aa0688e89849cc7ee767617ce2eab1ca90ad2d5c88d3c9dc19a9541efb3
Contents?: true
Size: 712 Bytes
Versions: 4
Compression:
Stored size: 712 Bytes
Contents
module Git # object that holds all the available stashes class Stashes include Enumerable def initialize(base) @stashes = [] @base = base @base.lib.stashes_all.each do |id, message| @stashes.unshift(Git::Stash.new(@base, message, true)) end end def save(message) s = Git::Stash.new(@base, message) @stashes.unshift(s) if s.saved? end def apply(index=nil) @base.lib.stash_apply(index) end def clear @base.lib.stash_clear @stashes = [] end def size @stashes.size end def each(&block) @stashes.each(&block) end def [](index) @stashes[index.to_i] end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
minad-git-1.1.1 | lib/git/stashes.rb |
minad-git-1.1.2 | lib/git/stashes.rb |
minad-git-1.1.3 | lib/git/stashes.rb |
minad-git-1.1.5 | lib/git/stashes.rb |