wordy-crystal
wordy
Add .and
and .or
methods to Object
and a not
top-level function.
This is what you get for allowing reopening and also not including the and
keyword in a language targeting aesthetic codebases.
You're welcome.
Installation
-
Add the dependency to your
shard.yml
:dependencies: wordy: github: dscottboggs/wordy-crystal
-
Run
shards install
Usage
require "wordy"
hash = {"a" => 1, "b" => 2}
puts hash["a"]?.or "'a' not found in hash"
puts "a and b found" if hash.has_key?("a").and hash.has_key? "b"
Development
This is a half-joke shard, but if you feel like being in on the joke and can think of something to add go for it haha
Contributing
- Fork it (https://github.com/dscottboggs/wordy-crystal/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Scott Boggs - creator and maintainer
Repository
wordy-crystal
Owner
Statistic
- 1
- 0
- 0
- 0
- 0
- over 3 years ago
- June 11, 2021
License
MIT License
Links
Synced at
Sun, 24 Nov 2024 04:59:58 GMT
Languages