Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save lujanfernaud/7975a285df59558f69642b7dc3548e5c to your computer and use it in GitHub Desktop.
Save lujanfernaud/7975a285df59558f69642b7dc3548e5c to your computer and use it in GitHub Desktop.

Revisions

  1. lujanfernaud created this gist Mar 19, 2021.
    7 changes: 7 additions & 0 deletions ruby_require_all_files_within_a_directory.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # Ruby: Require All Files Within a Directory

    ```rb
    Dir[File.expand_path('../config/routes/*.rb', __dir__)].each do |file|
    require_relative file
    end
    ```