Module: Jeweler::VersionHelper::PlaintextExtension

Defined in:
lib/jeweler/version_helper.rb

Instance Method Summary collapse

Instance Method Details

#parse_plaintextObject



50
51
52
# File 'lib/jeweler/version_helper.rb', line 50

def parse_plaintext
  update_to(read_plaintext.chomp)
end

#pathObject



62
63
64
# File 'lib/jeweler/version_helper.rb', line 62

def path
  plaintext_path
end

#read_plaintextObject



54
55
56
# File 'lib/jeweler/version_helper.rb', line 54

def read_plaintext
  File.read(plaintext_path)
end

#refreshObject



58
59
60
# File 'lib/jeweler/version_helper.rb', line 58

def refresh
  parse_plaintext
end

#writeObject



44
45
46
47
48
# File 'lib/jeweler/version_helper.rb', line 44

def write
  File.open(plaintext_path, 'w') do |file|
    file.puts to_s
  end
end