Sha256: 8fb7abc1e9131a4494ecf63e3cfe1d9115776b6c310347fccf3df360f3c68c5b

Contents?: true

Size: 739 Bytes

Versions: 2

Compression:

Stored size: 739 Bytes

Contents

# -*- coding: utf-8 -*-


module Xot


  extend module ModuleInfo

    def version ()
      open(root_dir 'VERSION') {|f| f.readline.chomp}
    end

    def root_dir (path = '')
      File.expand_path "../../../#{path}", __FILE__
    end

    def include_dirs ()
      %w[include].map {|dir| root_dir dir}
    end

    def lib_dirs ()
      %w[lib].map {|dir| root_dir dir}
    end

    def task_dir ()
      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

    self

  end# ModuleInfo


end# Xot

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
xot-0.1.6 lib/xot/module.rb
xot-0.1.5 lib/xot/module.rb