RubyGems Navigation menu

ivar 0.4.0

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.

Gemfile:
=

インストール:
=

バージョン履歴:

  1. 0.4.7 May 07, 2025 (35.5KB)
  2. 0.4.6 May 07, 2025 (35.5KB)
  3. 0.4.0 May 07, 2025 (35.5KB)
  4. 0.2.0 April 30, 2025 (17KB)

Runtime依存関係 (1):

prism ~> 1.2

所有者:

プッシュ者:

作者:

  • Avdi Grimm

SHA 256チェックサム:

=

累計ダウンロード数 302

このバージョンのみ 54

このバージョンがリリースされたのは:

ライセンス:

MIT

必要なRubyのバージョン: >= 3.3.0

リンク: