1 thought on “Rails console: five ways to get pretty output”

  1. Dont forget about the builtin pretty print for basic stuff:

    2.2.2 :059 > movie = {
    id: 1,
    title: “Batman”,
    year: 1989,
    genre: “Action, Adventure”,
    director: “Tim Burton”,
    production: “USA, Great Britain”,
    boxoffice: “$411 348 924”,
    description: “The Dark Knight of Gotham City begins his war on c…”,
    score: 7.6
    }

    2.2.2 :060 > pp movie;nil
    {:id=>1,
    :title=>”Batman”,
    :year=>1989,
    :genre=>”Action, Adventure”,
    :director=>”Tim Burton”,
    :production=>”USA, Great Britain”,
    :boxoffice=>”$411 348 924″,
    :description=>”The Dark Knight of Gotham City begins his war on c…”,
    :score=>7.6}
    => nil

    Reply

Leave a Comment