8000 GitHub - andyw8/aye_var
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

andyw8/aye_var

 
 

Repository files navigation

AyeVar 🏴‍☠️

Arrr, this gem be mighty fresh an’ experimental, me hearties! Th’ API be likely to shift with th’ tides.

What does it do?

It prevents ye from usin’ undefined instance variables by transformin’ yer code as it be loaded, savvy?

Instance variables must be declared in yer object’s initializer (even if they be initially set to nil). Only then can ye access ’em in th’ rest o’ yer code, ye scurvy dog!

Setup

Add this treasure to yer gemfile, arr!

gem "aye_var", require: false

Then require an’ initialize it in yer vessel as early as possible, ye hear? If ye be usin’ Bootsnap, it should be right after Bootsnap, or I’ll make ye walk th’ plank!

require "aye_var"

AyeVar.init(include: ["#{Dir.pwd}/**/*"])

Ye can pass in an array o’ globs to include: an’ exclude:, ye bilge rat!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%
0