Registry / utility / dry-struct

dry-struct

JSON →
library1.8.1rbrubygemsunverified

Typed structs and value objects for Ruby with attribute coercion and schema validation.

gem install dry-struct
INSTALL
IMPORT
SIG · DRY-STRUCT
D
dry-struct
utilityrubyv1.8.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Dry::Struct
require 'dry/struct'

Define and use a typed struct

require 'dry/struct' class Person < Dry::Struct attribute :name, Types::String attribute :age, Types::Integer end person = Person.new(name: 'Alice', age: 30) puts person.name
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.8.1latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
49 hits · last 30 days
node
48
Amazon
1
Resources
dry-struct — gem install dry-struct · libregistry