Module: Tins::P

Included in:
Object
Defined in:
lib/tins/p.rb

Overview

A module that provides debugging methods for inspecting objects by raising exceptions with their inspected representations.

This module adds p! and pp! methods that raise RuntimeError exceptions containing the inspected or pretty-inspected output of objects, making it easy to quickly debug values during development without printing to stdout.

Examples:

Using p! to inspect a single object

p!(some_variable)

Using pp! to inspect multiple objects

pp!(first_var, second_var)