Sha256: bc1e314e142d47b6b899f270cee437b41af257c3f99aa3aafbe4126bf3a53385
Contents?: true
Size: 385 Bytes
Versions: 24
Compression:
Stored size: 385 Bytes
Contents
# frozen_string_literal: true module Hako class Loader def initialize(base_module, base_path) @base_module = base_module @base_path = base_path end def load(name) require "#{@base_path}/#{name}" @base_module.const_get(camelize(name)) end private def camelize(name) name.split('_').map(&:capitalize).join('') end end end
Version data entries
24 entries across 24 versions & 1 rubygems