Registry / utility / ostruct

ostruct

JSON →
library0.6.3rbrubygemsunverified

Class to build custom data structures, similar to a Hash.

gem install ostruct
INSTALL
IMPORT
SIG · OSTRUCT
O
ostruct
utilityrubyv0.6.3
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.

OpenStruct
require 'ostruct'

Create and access an OpenStruct

require 'ostruct' person = OpenStruct.new(name: 'John', age: 30) puts person.name
Debug
Known issues
gotchaOpenStruct is slow and may be removed from Ruby standard library in future versions.
fix
Consider using Struct or a custom class instead.
affects: >= 3.0.0
Upgrade
Version history
0.6.3latest on RubyGems
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
ostruct — gem install ostruct · libregistry