Ruby Structs with type specifications for the properties

This page summarizes the projects mentioned and recommended in the original post on /r/ruby

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • typed_struct

    Ruby structs but with type-checked attributes ⚡️🔐

  • rbs

    Type Signature for Ruby

  • Specify simple types (with class names or literal values), or complex types (with RBS notation) for each property of your struct:

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Virtus

  • One well-known example is https://github.com/solnic/virtus . There are others.

  • bindata

    BinData - Reading and Writing Binary Data in Ruby

  • These projects always remind me of binary formats. I've used bindata to work with binary formats coming from UDP streams over a network, and it's very handy to have a layer that encapsulates your expectations about the data you're receiving, combined with an exception handling apparatus.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts