nested_open_struct 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/README.md +23 -3
  2. metadata +5 -4
data/README.md CHANGED
@@ -1,5 +1,25 @@
1
- # NestedOpenStruct
1
+ # NestedOpenStruct [![Build Status](https://secure.travis-ci.org/porras/nested_open_struct.png?branch=master)](http://travis-ci.org/porras/nested_open_struct)
2
2
 
3
- Pending:
3
+ Thin wrapper around OpenStruct in order to create nested structs. Useful for storing configuration settings e.g. loaded from a YAML file.
4
4
 
5
- * Write a short a sweet README.
5
+ Example:
6
+
7
+ data = NestedOpenStruct.new(
8
+ :services => {
9
+ :ftp => {
10
+ :host => 'ftp.example.com',
11
+ :login => 'wadus',
12
+ :password => 'secret'
13
+ },
14
+ :web => {
15
+ :url => 'http://example.com/'
16
+ }
17
+ }
18
+ )
19
+
20
+ data.services.ftp.host
21
+ => "ftp.example.com"
22
+ data.services.ftp.login
23
+ => "wadus"
24
+ data.services.web.url
25
+ => "http://example.com/"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nested_open_struct
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
+ - 1
7
8
  - 0
8
9
  - 0
9
- - 1
10
- version: 0.0.1
10
+ version: 1.0.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Gil
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-07-02 00:00:00 Z
18
+ date: 2012-07-03 00:00:00 Z
19
19
  dependencies: []
20
20
 
21
21
  description: Thin wrapper around OpenStruct to make structs 'nested'
@@ -66,3 +66,4 @@ specification_version: 3
66
66
  summary: Thin wrapper around OpenStruct to make structs 'nested'
67
67
  test_files: []
68
68
 
69
+ has_rdoc: