lib/cloud_powers/helper.rb in cloud_powers-0.2.5 vs lib/cloud_powers/helper.rb in cloud_powers-0.2.6
- old
+ new
@@ -86,13 +86,11 @@
carry.tap do |h|
if block_given?
key = yield k
value = if v.kind_of?(Hash)
- deep_modify_keys_with(v) do |new_key|
- Proc.new.call(new_key)
- end
+ deep_modify_keys_with(v) { |new_key| Proc.new.call(new_key) }
else
v
end
h[key] = value
@@ -106,15 +104,10 @@
else
params
end
end
- def errors
- # TODO: wow...needs work
- $errors ||= SmashError.instance
- end
-
# Join the message and backtrace into a String with line breaks
def format_error_message(error)
begin
[error.message, error.backtrace.join("\n")].join("\n")
rescue Exception => e
@@ -127,10 +120,10 @@
# @returns @log_file path <String>
def log_file
@log_file ||= zfind('LOG_FILE')
end
- # @returns: An instance of Logger, cached as @logger
+ # === @returns: An instance of Logger, cached as @logger
def logger
@logger ||= create_logger
end
# Allows you to modify all first-level keys with a block that you pass.