typed_struct
Ruby structs but with type-checked attributes ⚡️🔐 (by johansenja)
hash_to_struct
It enables recursive conversion of a ruby Hash to a Struct-like object and back. (by a-bohush)
typed_struct | hash_to_struct | |
---|---|---|
1 | 1 | |
15 | 4 | |
- | - | |
0.0 | 0.0 | |
over 1 year ago | about 2 years ago | |
Ruby | Ruby | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
typed_struct
Posts with mentions or reviews of typed_struct.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2021-06-29.
hash_to_struct
Posts with mentions or reviews of hash_to_struct.
We have used some of these posts to build our list of alternatives
and similar projects.
-
Convert a Hash to a Struct-like object
To facilitate this, I've built the hash_to_struct gem, which defines a unified interface for creating objects based on Struct or OpenStruct out of Hash objects, with an ability to use nested hashes and a few other convenient features. It is a simple gem under 100 lines of code, with no external dependencies.
What are some alternatives?
When comparing typed_struct and hash_to_struct you can also consider the following projects:
dry-struct - Typed struct and value objects
rbs - Type Signature for Ruby
Ruby-Cheatsheet - 💎 The missing cheatsheet for Ruby
bindata - BinData - Reading and Writing Binary Data in Ruby
Virtus
gem_rbs_collection - A collection of RBS for gems.