Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

human_hash

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

human_hash

  • 0.2.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= Human Readable Hash Inspection w/ Vertical Display

This gem adds a human_inspect() method to the Ruby Hash object that returns a Ruby Hash inspection String with a vertical display, something more easily readable by humans (like me), when the Hash is larger than a few keys.

puts myhash.human_inspect { :whatever => { :whatever => { :two => "two", :another => { :and => "and", :more => "more" }, :array => [0, 1, 2], :one => "one", :bool => true } }, 2 => "two", 4 => "four" }

human_inspect() will display String keys as symbols by default, but only because this is my personal preference. To show String keys as Strings add false to the method call: puts myhash.human_inspect(false).

== Copyright

Copyright (c) 2010 Eric Woodward. See LICENSE for details. http://ejw.com.

FAQs

Package last updated on 03 Sep 2010

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc