Class: GitSemverCop::VersionFile

Inherits:
Object
  • Object
show all
Defined in:
lib/git-semver-cop/version_files/version_file.rb

Direct Known Subclasses

Gemspec, PackageJson

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.pathObject

Returns the value of attribute path.



6
7
8
# File 'lib/git-semver-cop/version_files/version_file.rb', line 6

def path
  @path
end

Class Method Details

.exist?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/git-semver-cop/version_files/version_file.rb', line 8

def exist?
  File.exist?(path)
end

Instance Method Details

#pathObject



19
20
21
# File 'lib/git-semver-cop/version_files/version_file.rb', line 19

def path
  self.class.path
end

#updateObject



13
14
15
16
17
# File 'lib/git-semver-cop/version_files/version_file.rb', line 13

def update
  update_version
  write_update
  add_to_git
end