Class: SemverBump::Bump

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

Instance Method Summary collapse

Constructor Details

#initialize(path = '.') ⇒ Bump

Returns a new instance of Bump.



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

def initialize(path='.')
  @path = path
end

Instance Method Details

#currentObject



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

def current
  version_file.semver.to_s
end

#version_fileObject



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

def version_file
  @version_file ||= VersionFile.new(version_file_path)
end

#version_file_pathObject



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

def version_file_path
  @version_file_path ||= Find.new(@path).version_file_path
end