Class: Git::Stash

Inherits:
Object
  • Object
show all
Defined in:
lib/git/stash.rb

Instance Method Summary collapse

Constructor Details

#initialize(base, message, existing = false) ⇒ Stash

Returns a new instance of Stash.



4
5
6
7
8
# File 'lib/git/stash.rb', line 4

def initialize(base, message, existing=false)
  @base = base
  @message = message
  save unless existing
end

Instance Method Details

#message



18
19
20
# File 'lib/git/stash.rb', line 18

def message
  @message
end

#save



10
11
12
# File 'lib/git/stash.rb', line 10

def save
  @saved = @base.lib.stash_save(@message)
end

#saved?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/git/stash.rb', line 14

def saved?
  @saved
end

#to_s



22
23
24
# File 'lib/git/stash.rb', line 22

def to_s
  message
end