Module: Hanami::Utils

Defined in:
gems/gems/hanami-utils-2.1.0/lib/hanami/utils.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/io.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/hash.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/json.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/blank.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/class.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/files.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/kernel.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/string.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/version.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/callbacks.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/file_list.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/load_paths.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/deprecation.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/path_prefix.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/shell_color.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/query_string.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/class_attribute.rb,
gems/gems/hanami-utils-2.1.0/lib/hanami/utils/class_attribute/attributes.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/io.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/hash.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/json.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/blank.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/class.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/files.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/kernel.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/string.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/version.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/callbacks.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/file_list.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/load_paths.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/deprecation.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/path_prefix.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/shell_color.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/query_string.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/class_attribute.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils/class_attribute/attributes.rb,
gems/gems/hanami-utils-2.2.0.beta1/lib/hanami/utils.rb

Overview

Ruby core extentions and Hanami utilities

Since:

  • 0.1.0

Defined Under Namespace

Modules: Callbacks, ClassAttribute, FileList, Files, Hash, Json, Kernel, QueryString, String Classes: Class, Deprecation, IO, LoadPaths, PathPrefix

Class Method Summary collapse

Class Method Details

.require!(directory) ⇒ Object

Recursively requires Ruby files under the given directory.

If the directory is relative, it implies it’s the path from current directory. If the directory is absolute, it uses as it is.

It respects file separator of the current operating system. A pattern like "path/to/files" will work both on *NIX and Windows machines.

Parameters:

  • directory (String, Pathname)

    the directory

Since:

  • 0.9.0

def self.require!(directory)
  for_each_file_in(directory) { |file| require_relative(file) }
end