Class: Gemdiff::GemUpdater

Inherits:
Object
  • Object
show all
Defined in:
lib/gemdiff/gem_updater.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ GemUpdater

Returns a new instance of GemUpdater.



7
8
9
# File 'lib/gemdiff/gem_updater.rb', line 7

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



5
6
7
# File 'lib/gemdiff/gem_updater.rb', line 5

def name
  @name
end

Instance Method Details

#clean?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/gemdiff/gem_updater.rb', line 31

def clean?
  git_diff.empty?
end

#commitObject



23
24
25
# File 'lib/gemdiff/gem_updater.rb', line 23

def commit
  git_commit
end

#diffObject



15
16
17
# File 'lib/gemdiff/gem_updater.rb', line 15

def diff
  git_diff
end

#resetObject



27
28
29
# File 'lib/gemdiff/gem_updater.rb', line 27

def reset
  git_reset
end

#showObject



19
20
21
# File 'lib/gemdiff/gem_updater.rb', line 19

def show
  git_show
end

#updateObject



11
12
13
# File 'lib/gemdiff/gem_updater.rb', line 11

def update
  bundle_update
end