Pry is an IRB alternative and runtime developer console. Pry features syntax highlighting, a flexible plugin architecture, runtime invocation and source, and documentation browsing. This is a powerful alternative to the standard IRB shell for Ruby. While Pry-Rails was included in the list of the most used Ruby gems of all the time, we’d like you to know that it heavily depends on Pry. And today we want you to get to know Pry Ruby gem.
In a nutshell, Pry is a type of REPL. REPL stands for Read, Evaluate, Print, Loop. It is an interactive programming environment that takes a user’s input, evaluates it and returns the result to the user.
histcommand enables you to view, search, and replay history, among other things.
--replayoption we can re-evaluate expression(s).
- To fix errors in multiple-line expressions into Pry we use the
- Pry gives us the possibility of changing methods on the fly using the
find-methodfor looking up methods/objects whose names you do not remember.
show-modelcommand lists the model attributes and class associations.
Ask Syndicode about Ruby on Rails development! We’d love to help you!