Module: Versionator::File

Included in:
Version
Defined in:
lib/versionator/file.rb

Instance Method Summary collapse

Instance Method Details

#readObject



7
8
9
# File 'lib/versionator/file.rb', line 7

def read
  IO.read(Versionator.version_file) rescue nil
end

#write(version = "0.0.0") ⇒ Object



3
4
5
# File 'lib/versionator/file.rb', line 3

def write(version="0.0.0")
  ::File.open(Versionator.version_file, 'w') {|f| f.write(version) }
end