Registry / utility / structure

structure

JSON →
library4.4.0rbrubygemsunverified

Provides a DSL for generating immutable Ruby data objects with type coercion and data transformation.

gem install structure
INSTALL
IMPORT
SIG · STRUCTURE
S
structure
utilityrubyv4.4.0
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.

Structure
require 'structure'

Define an immutable Point struct with a method

require 'structure' class Point < Structure.of(:x, :y) def distance Math.sqrt(x**2 + y**2) end end p = Point.new(x: 3, y: 4) puts p.distance
Debug
Known issues

No known issues recorded.

Upgrade
Version history
4.4.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Resources
structure — gem install structure · libregistry