Sha256: e886a91544beba54b96c9ab35cf5888d0cbfb4039befede9839ead76a533baa9

Contents?: true

Size: 741 Bytes

Versions: 2

Compression:

Stored size: 741 Bytes

Contents

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


module Rays


  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# Rays

Version data entries

2 entries across 2 versions & 1 rubygems

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