Sha256: fa288fa447e259d15730b77a4b82ce5e485e3ed3241a4d1ef4a6cc4b0c877f7c
Contents?: true
Size: 760 Bytes
Versions: 160
Compression:
Stored size: 760 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
160 entries across 133 versions & 24 rubygems