Class: Git::Stash
- Inherits:
-
Object
- Object
- Git::Stash
- Defined in:
- lib/git/stash.rb
Overview
A stash in a Git repository
Instance Attribute Summary collapse
-
#message
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(base, message, existing = nil, save: nil) ⇒ Stash
constructor
A new instance of Stash.
- #save
- #saved? ⇒ Boolean
- #to_s
Constructor Details
#initialize(base, message, existing = nil, save: nil) ⇒ Stash
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/git/stash.rb', line 6 def initialize(base, , existing = nil, save: nil) unless existing.nil? Git::Deprecation.warn( 'The "existing" argument is deprecated and will be removed in a future version. Use "save:" instead.' ) end # default is false save = existing.nil? && save.nil? ? false : save | existing @base = base = self.save unless save end |
Instance Attribute Details
#message (readonly)
Returns the value of attribute message.
29 30 31 |
# File 'lib/git/stash.rb', line 29 def end |
Instance Method Details
#save
21 22 23 |
# File 'lib/git/stash.rb', line 21 def save @saved = @base.lib.stash_save() end |
#saved? ⇒ Boolean
25 26 27 |
# File 'lib/git/stash.rb', line 25 def saved? @saved end |
#to_s
31 32 33 |
# File 'lib/git/stash.rb', line 31 def to_s end |