
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
A gem for null object pattern easy implementation on Ruby objects.
Nilify works with Ruby 1.9.3 onwards. Install this gem with:
gem install 'nilify'
##Example
Let's check an example for the next Item class.
class Item
attr_accessor :sku, :title
end
To create a class with mock methods there are two options:
# Option 1
# on the nil class specify the methods to mock
class NilItem
extend Nilify
nilify [:sku, :title]
end
# Option 2
# Pass the Item class to mock all the defined methods inside that class.
class NilItem
extend Nilify
nilify_from Item
end
Then you can use the mocked methods like this:
> item = Item.new
> item.id
=> nil
> item = NilItem.new
> item.id
=> "id is a mock method"
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)Rubixware - hello@rubixware.com
MIT License. Copyright 2015 Rubixware. http://www.rubixware.com
FAQs
Unknown package
We found that nilify demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.