Project

otoindiff

0.0
The project is in a healthy, maintained state
The otoindiff gem modifies all Ruby Hash objects to support indifferent access by default, allowing seamless use of string or symbol keys interchangeably.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

 Project Readme

Otoindiff

otoindiff is a Ruby gem that globally enhances the behavior of Ruby's Hash class to support indifferent access by default. With otoindiff, you can access hash keys using either symbols or strings interchangeably without any extra steps like calling with_indifferent_access.

Features

  • Seamlessly access hash keys as symbols or strings.
  • Works with nested hashes and supports methods like dig and fetch.
  • No need to manually call with_indifferent_access on hashes.

Installation

Add this line to your application's Gemfile:

gem 'otoindiff'