Module: Doing::Util
Overview
Utilities
Defined Under Namespace
Modules: Backup
Instance Method Summary collapse
- #args_for_editor(editor) ⇒ Object
-
#deep_merge_hashes(master_hash, other_hash) ⇒ Object
Non-destructive version of deep_merge_hashes! See that method.
-
#deep_merge_hashes!(target, overwrite) ⇒ Object
Merges a master hash with another hash, recursively.
- #default_editor ⇒ Object
- #duplicable?(obj) ⇒ Boolean
- #duplicate_frozen_values(target) ⇒ Object
- #editor_with_args ⇒ Object
-
#exec_available(cli) ⇒ Object
Test if command line tool is available.
- #find_default_editor(editor_for = 'default') ⇒ Object
-
#first_available_exec(*commands) ⇒ Object
Return the first valid executable from a list of commands.
- #mergable?(value) ⇒ Boolean
- #merge_default_proc(target, overwrite) ⇒ Object
- #merge_values(target, overwrite) ⇒ Object
- #safe_load_file(filename) ⇒ Object
- #user_home ⇒ Object
-
#write_to_file(file, content, backup: true) ⇒ Object
Write content to a file.
Instance Method Details
#args_for_editor(editor) ⇒ Object
#deep_merge_hashes(master_hash, other_hash) ⇒ Object
Non-destructive version of deep_merge_hashes! See that method.
#deep_merge_hashes!(target, overwrite) ⇒ Object
Merges a master hash with another hash, recursively.
master_hash - the "parent" hash whose values will be overridden other_hash - the other hash whose values will be persisted after the merge
This code was lovingly stolen from some random gem: http://gemjack.com/gems/tartan-0.1.1/classes/Hash.html
Thanks to whoever made it.
#default_editor ⇒ Object
#duplicable?(obj) ⇒ Boolean
#duplicate_frozen_values(target) ⇒ Object
#editor_with_args ⇒ Object
#exec_available(cli) ⇒ Object
Test if command line tool is available
#find_default_editor(editor_for = 'default') ⇒ Object
#first_available_exec(*commands) ⇒ Object
Return the first valid executable from a list of commands
#mergable?(value) ⇒ Boolean
#merge_default_proc(target, overwrite) ⇒ Object
#merge_values(target, overwrite) ⇒ Object
#safe_load_file(filename) ⇒ Object
#user_home ⇒ Object
#write_to_file(file, content, backup: true) ⇒ Object
Write content to a file