# # File 'model.rb' created on 10 mar 2008 at 13:39:48. # # See 'dokkit.rb' or +LICENSE+ for licence information. # # (C) 2008 Andrea Fazzi (and contributors). # require 'yaml' require 'dokkit/taskconfig' require 'dokkit/cachemanager' module Dokkit class Model class << self def init(name = 'model', &blk) @model ||= Model.new(name, &blk) end end attr_accessor :config attr_reader :name, :cache def initialize(name, &blk) @name = name @config = TaskConfig.new yield self if block_given? @cache = CacheManager.instance @cache.init('deps.yaml', @config.cache_dir) self end end end