# -*- coding: utf-8 -*- module Rays extend module ClassMethods def root_dir () File.expand_path(File.join File.dirname(__FILE__), '..', '..') end def include_dirs () [File.join(root_dir, 'include')] end def library_dirs () %w[lib ext].map {|dir| File.join root_dir, dir} end def task_dir () File.join root_dir, 'task' end def load_tasks (*names) if names.empty? Dir["#{task_dir}/**/*.rake"].each {|path| load path} else names.each do |name| path = "#{task_dir}/#{name}.rake" load path if File.exist? path end end end def version () open(File.join root_dir, 'VERSION') {|f| f.readline.chomp} end self end# ClassMethods end# Rays