Sha256: fd5757a7d86e887b3b8881e6ab8989ff03fdfeda1e65f9201a74f06b8f062131

Contents?: true

Size: 746 Bytes

Versions: 6

Compression:

Stored size: 746 Bytes

Contents

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


module Xot


  module Module

    def name ()
      super.split('::')[-2]
    end

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

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

    def include_dir ()
      root_dir 'include'
    end

    def lib_dir ()
      root_dir 'lib'
    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

    extend self

  end# Module


end# Xot

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
xot-0.1.12 lib/xot/module.rb
xot-0.1.11 lib/xot/module.rb
xot-0.1.10 lib/xot/module.rb
xot-0.1.9 lib/xot/module.rb
xot-0.1.8 lib/xot/module.rb
xot-0.1.7 lib/xot/module.rb