itgrl-blank

Adds Ruby on Rails extension .blank? that checks for empty strings, nil, and whitespace


License
Apache-2.0
Install
puppet module install itgrl-blank --version 1.0.0

Documentation

This is a basic module that provides an extention to Ruby and Puppet Code with the Ruby on Rails method .blank?

blank?() public An object is blank if it’s false, empty, or a whitespace string. For example, false, ”, β€˜ ’, nil, [], and {} are all blank.

This simplifies

!address || address.empty? to

address.blank? @return [true, false]

https://apidock.com/rails/Object/blank%3F