0.02
No release in over 3 years
Low commit activity in last 3 years
Poorly monkeypatches Object for bullshit falsiness checks
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.12
~> 5.0
~> 10.0
 Project Readme

is_bullshit

Call bullshit on stuff.

Build Status

Sometimes things that are "truthy" are really just bullshit. This gem is for when falsey/truthy aren't enough.

Installation

It's a gem. Add this line to your application's Gemfile:

gem 'is_bullshit'

And then execute:

$ bundle

Or install it yourself as:

$ gem install is_bullshit

Usage

Call .bullshit? on stuff. .is_bullshit? was added as an alias also because the gem name bullshit was already taken and I wanted a method to match the gem name.

The following values qualify as total bullshit: [nil, [], {}, 0, false, 'undefined', 'false', '', '0', 'nil', 'null']

.legit? and .seems_legit? are the opposite of .bullshit?

nil.bullshit?               # true
''.bullshit?                # true
[].bullshit?                # true
{}.bullshit?                # true
nil.is_bullshit?            # also works

# ...etc

'undefined'.seems_legit?    # false
'foo'.bullshit?             # false
'foo'.seems_legit?          # true

Development

First, decide if this is something you truly want to spend time on. Life is short and getting shorter, and each moment is precious.

If you still want to spend a slice of your limited time on Earth making some meaningless change to is_bullshit: after checking out the repo, run bin/setup to install dependencies. Then, run rake test to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment with bullshit.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/alexford/is_bullshit. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.