class Verku::Build::Base
Public Class Methods
new(root_dir)
click to toggle source
# File lib/verku/build.rb, line 4 def initialize(root_dir) @root_dir = root_dir @file = build_file old = Yaml.load(File.read(path),:safe => true) @data = { :built_on => Date.today.to_s :build => old.build.to_i + 1 } end
Public Instance Methods
build()
click to toggle source
# File lib/verku/build.rb, line 16 def build return @data[:build] end
built_on()
click to toggle source
# File lib/verku/build.rb, line 13 def built_on return @data[:built_on] end
Private Instance Methods
build_file()
click to toggle source
# File lib/verku/build.rb, line 23 def build_file path = @root_dir.join("_build.yml") raise "Invalid Verku directory; couldn't found #{path} file." unless File.file?(path) return path end
save()
click to toggle source
# File lib/verku/build.rb, line 20 def save File.open(build_file,'w').write(@data.to_yaml) end