module TTY::Utils
def blank?(value)
- Api: - public
Returns:
-
(Boolean)
-
Parameters:
-
value
(Object
) --
def blank?(value) value.nil? || BLANK_REGEX === value end
def deep_copy(object)
- Api: - public
def deep_copy(object) Marshal.load(Marshal.dump(object)) end
def extract_options(args)
- Api: - public
Parameters:
-
args
(Array[Object]
) --
def extract_options(args) options = args.last options.respond_to?(:to_hash) ? options.to_hash.dup : {} end
def extract_options!(args)
def extract_options!(args) args.last.respond_to?(:to_hash) ? args.pop : {} end