0.0
No commit activity in last 3 years
No release in over 3 years
manage blank elements of Array objects.(Rails is not required, but ActiveSupport is required.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
>= 0
>= 0
>= 0

Runtime

 Project Readme

Build Status

BlankElement

remove blank or null elements from Array object

Installation

Add this line to your application's Gemfile:

gem 'blank_element'

And then execute:

$ bundle

Or install it yourself as:

$ gem install blank_element

Usage

require 'blank_element'

array = ['battleship', 'cruiser', 'destroyer', ' ']
array.blank_all? # => false
arra.present_any? # => true
array.reject_blank # => ['battleship', 'cruiser', 'destroyer']
array.reject_blank! # => bang method

blank_array = [' ', ' ', ' ']
blank_array.blank_all? # => true
blank_array.present_any? # => false

empty_array = []
empty_array.blank_all? # => true
empty_array.present_any? # => false

Contributing

  1. Fork it ( http://github.com//blank_element/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request