Sha256: 09bb8334e79deb9e1e03ed2b1287efe106f0814ce0f59b80ee22e26da955dcb2

Contents?: true

Size: 278 Bytes

Versions: 5

Compression:

Stored size: 278 Bytes

Contents

module Rubotnik
  module Autoloader
    def self.root
      Dir.pwd
    end

    def self.load(folder)
      Dir[
        File.expand_path(
          File.join(root, folder)
        ) + "/**/*.rb"
      ].each do |file|
        require_relative file
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubotnik-0.2.3 lib/rubotnik/autoloader.rb
rubotnik-0.2.2 lib/rubotnik/autoloader.rb
rubotnik-0.2.1 lib/rubotnik/autoloader.rb
rubotnik-0.2.0 lib/rubotnik/autoloader.rb
rubotnik-0.1.1 lib/rubotnik/autoloader.rb