0.0
No commit activity in last 3 years
No release in over 3 years
typically make JSON into object with accessors
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

~> 6.0.0beta3
 Project Readme

Simple::Hash

typically make JSON into object with accessors

installation

$ gem install simple-hash

or

gem 'simple-hash'
$ bundle

usage

user = SimpleHash.new(name: "localhostdotdev", writing?: true)
user.name # => "localhostdotdev"
user.writing? # => true
user[:name] # => "localhostdotdev"
user["name"] # => "localhostdotdev"
user.namme # => NoMethodError, did you mean? name
user.try(:nammmes) # => nil
user.keys # => [:name, :writing?]
user.values # => ["localhostdotdev", true]

# what about that?
user = SimpleHash[emails: [{ domain: "localhost.dev" }]]
user.emails.first.domain # "localhost.dev"

todo: look into delete_missing_to and SimpleDelegator