Top Level Namespace

Defined Under Namespace

Modules: Radical Classes: App, Controller, Model, Routes

Instance Method Summary collapse

Instance Method Details

#require_all(*args) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/radical/generator/app/app.rb', line 5

def require_all(*args)
  args.each do |arg|
    file = File.join(__dir__, arg)

    if File.exist?("#{file}.rb")
      require file
    else
      Dir[File.join(file, '*.rb')].sort.each do |f|
        require f
      end
    end
  end
end