Sha256: 031fd498a334690de5a8c3b7b3b1ab37b3fb5086a2b3e2ecbbb01ef1ab7c8225

Contents?: true

Size: 516 Bytes

Versions: 2

Compression:

Stored size: 516 Bytes

Contents

Hash object with struct access.
Main purpose is to be a configuration object.

*Warning*: It can't be modified after initialization.

```ruby
# Simple example
hash = HashWithStructAccess.new(:foo => {:bar => 42})
hash.foo #=> {:bar => 42}
hash.foo.bar #=> 42

# More complex example
hash = HashWithStructAccess.new(:foo => {(o = Object.new) => {"bar" => {1 => :baz}}})
hash.foo #=> {o => {"bar" => {1 => :baz}}}
hash.foo[o] #=> {"bar" => {1 => :baz}}
hash.foo[o].bar #=> {1 => :baz}
hash.foo[o].bar[1] #=> :baz
```

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hash_with_struct_access-0.0.2 README.md
hash_with_struct_access-0.0.1 README.md