Class: Racket::Utils::ToolBelt
- Inherits:
-
Object
- Object
- Racket::Utils::ToolBelt
- Includes:
- Application, Exceptions, FileSystem, Helpers, Views
- Defined in:
- lib/racket/utils.rb
Overview
Collects functionality from all utility modules into a handy class.
Class Method Summary collapse
-
.service(options = {}) ⇒ Proc
Returns a service proc that can be used by the registry.
Instance Method Summary collapse
-
#initialize(root_dir) ⇒ ToolBelt
constructor
A new instance of ToolBelt.
Methods included from Views
Methods included from Helpers
#__apply_helpers, #apply_helpers
Methods included from FileSystem
#build_path, dir_or_nil, dir_readable?, extract_dir_and_glob, file_readable?, first_matching_path, fs_path, matching_paths, resolve_path, resolve_path_with_default, #safe_require
Methods included from Exceptions
Constructor Details
#initialize(root_dir) ⇒ ToolBelt
Returns a new instance of ToolBelt.
45 46 47 |
# File 'lib/racket/utils.rb', line 45 def initialize(root_dir) @root_dir = Pathname.new(root_dir).cleanpath. end |
Class Method Details
.service(options = {}) ⇒ Proc
Returns a service proc that can be used by the registry.
41 42 43 |
# File 'lib/racket/utils.rb', line 41 def self.service( = {}) -> { new([:root_dir]) } end |