Registry / utility / immutable-struct

immutable-struct

JSON →
library2.5.0rbrubygemsunverified

Easily create value objects without the pain of Ruby's Struct or its setters.

gem install immutable-struct
INSTALL
IMPORT
SIG · IMMUTABLE-STRUCT
I
immutable-struct
utilityrubyv2.5.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.

ImmutableStruct
require 'immutable-struct'

Define and use an immutable value object

require 'immutable-struct' Point = ImmutableStruct.new(:x, :y) p = Point.new(3, 4) puts p.x # => 3 # p.x = 5 # raises NoMethodError
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.5.0latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
immutable-struct — gem install immutable-struct · libregistry