class Client
# @return [Boolean]
def credentials?
credentials.values.none? { |v| blank?(v) }
end
private
def blank?(s)
s.respond_to?(:empty?) ? s.empty? : !s
end
end
Blank Function in Ruby
2017-07-01
class Client
# @return [Boolean]
def credentials?
credentials.values.none? { |v| blank?(v) }
end
private
def blank?(s)
s.respond_to?(:empty?) ? s.empty? : !s
end
end