Sha256: be87b12cc70edfc09179181f7ef8799476edeca72d81a4956bc1f82af778bcb8
Contents?: true
Size: 472 Bytes
Versions: 6
Compression:
Stored size: 472 Bytes
Contents
module Daigaku module Loadable require 'active_support/inflector' def load(path) if Dir.exist?(path) dirs = Dir.entries(path).select do |entry| !entry.match(/\./) end dirs.sort.map do |dir| dir_path = File.join(path, dir) class_name = self.to_s.demodulize.singularize "Daigaku::#{class_name}".constantize.new(dir_path) end else Array.new end end end end
Version data entries
6 entries across 6 versions & 1 rubygems