Module: Hanami::Utils

Defined in:
gems/gems/hanami-utils-1.3.0/lib/hanami/utils.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/io.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/hash.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/json.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/blank.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/class.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/files.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/escape.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/kernel.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/string.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/version.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/callbacks.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/file_list.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/inflector.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/load_paths.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/deprecation.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/path_prefix.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/shell_color.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/basic_object.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/query_string.rb,
gems/gems/hanami-utils-1.3.0/lib/hanami/utils/class_attribute.rb

Overview

Ruby core extentions and Hanami utilities

Since:

  • 0.1.0

Defined Under Namespace

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

Constant Summary

VERSION =

Defines the version

Since:

  • 0.1.0

'1.3.0'.freeze

Class Method Summary collapse

Class Method Details

.require!(directory) ⇒ Object

Recursively require 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