Metadata


Name
ivar
Version
0.4.0
Platform
ruby
Authors
Avdi Grimm
Bindir
bin
Date
1980-01-02 00:00:00 UTC
Dependencies
prism (~> 1.2)
Description
Ruby instance variables are so convenient - you don't even need to declare them! But... they are also dangerous, because a mispelled variable name results in `nil` instead of an error. Why not have the best of both worlds? Ivar lets you use plain-old instance variables, and automatically checks for typos. Ivar waits until an instance is created to do the checking, then uses Prism to look for variables that don't match what was set in initialization. So it's a little bit dynamic, a little bit static. It doesn't encumber your instance variable reads and writes with any extra checking. And with the `:warn_once` policy, it won't overwhelm you with output.
Email
avdi@avdi.codes
Files
.augment-guidelines
.devcontainer/Dockerfile
.devcontainer/devcontainer.json
.devcontainer/post-create.sh
.editorconfig
.rubocop.yml
.standard.yml
.vscode/extensions.json
.vscode/launch.json
.vscode/settings.json
CHANGELOG.md
CODE_OF_CONDUCT.md
LICENSE.txt
README.md
Rakefile
VERSION.md
examples/check_all_block_example.rb
examples/check_all_example.rb
examples/inheritance_with_kwarg_init.rb
examples/inheritance_with_positional_init.rb
examples/mixed_positional_and_kwarg_init.rb
examples/require_check_all_example.rb
examples/sandwich_inheritance.rb
examples/sandwich_with_accessors.rb
examples/sandwich_with_block_values.rb
examples/sandwich_with_checked.rb
examples/sandwich_with_checked_once.rb
examples/sandwich_with_initial_values.rb
examples/sandwich_with_ivar_block.rb
examples/sandwich_with_ivar_macro.rb
examples/sandwich_with_kwarg_init.rb
examples/sandwich_with_positional_init.rb
examples/sandwich_with_shared_values.rb
hooks/README.md
hooks/install.sh
hooks/pre-commit
ivar.gemspec
lib/ivar.rb
lib/ivar/check_all.rb
lib/ivar/check_all_manager.rb
lib/ivar/check_policy.rb
lib/ivar/checked.rb
lib/ivar/checked/class_methods.rb
lib/ivar/checked/instance_methods.rb
lib/ivar/declaration.rb
lib/ivar/explicit_declaration.rb
lib/ivar/explicit_keyword_declaration.rb
lib/ivar/explicit_positional_declaration.rb
lib/ivar/macros.rb
lib/ivar/manifest.rb
lib/ivar/policies.rb
lib/ivar/project_root.rb
lib/ivar/targeted_prism_analysis.rb
lib/ivar/validation.rb
lib/ivar/version.rb
script/console
script/de-lint
script/de-lint-unsafe
script/lint
script/release
script/setup
script/test
sig/ivar.rbs
test_file.rb
Homepage
https://github.com/avdi/ivar
Licenses
MIT
Metadata
{"allowed_push_host"=>"https://rubygems.org", "homepage_uri"=>"https://github.com/avdi/ivar", "source_code_uri"=>"https://github.com/avdi/ivar", "changelog_uri"=>"https://github.com/avdi/ivar/blob/main/CHANGELOG.md"}
Require paths
lib
Required ruby version
>= 3.3.0
Required rubygems version
>= 0
Rubygems version
3.6.7
Specification version
4
Summary
Automatically check instance variables for typos.
Original platform
ruby
New platform
ruby