Skip to content
/ lowkey Public

An API for accessing PRISM metadata easily and efficiently

License

Notifications You must be signed in to change notification settings

low-rb/lowkey

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gem version GitHub repo Codeberg repo

Lowkey

PRISM is amazing and opens a new way to access metadata in Ruby. However:

  • Loading and reloading the Abstract Syntax Tree (AST) multiple times is inefficient
  • Navigating the AST can be difficult

Lowkey provides a central API to make storing and accessing the AST more efficient and easier.

Config

Copy and paste the following and change the defaults to configure Lowkey:

# This configuration should be set before calling "Lowkey.load".
Lowkey.configure do |config|
  # A big benefit of Lowkey is its caching of abstract syntax trees, file proxies and class proxies.
  # But to save memory you should clear them after the "class load"/setup stage of your application.
  # Set to "false" or call "Lowkey.clear" after you no longer need Lowkey, such as in a boot script.
  config.cache = true
end

Installation

Add gem 'lowkey' to your Gemfile then:

bundle install

About

An API for accessing PRISM metadata easily and efficiently

Resources

License

Stars

Watchers

Forks

Packages

No packages published