purple_hash 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +5 -0
- data/README.md +4 -11
- data/Rakefile +2 -2
- metadata +3 -2
data/CHANGELOG
ADDED
data/README.md
CHANGED
@@ -16,23 +16,16 @@ config # => {:db => {:user => 'root'}}
|
|
16
16
|
```
|
17
17
|
|
18
18
|
Because a `PurpleHash` is simply a sub-class of `Hash` you can do anything you
|
19
|
-
would normally be able to without any hacks or tricks.
|
20
|
-
|
21
|
-
|
22
|
-
```ruby
|
23
|
-
class Hash
|
24
|
-
def to_purple_hash
|
25
|
-
PurpleHash.new(self)
|
26
|
-
end
|
27
|
-
end
|
28
|
-
```
|
19
|
+
would normally be able to without any hacks or tricks. A core extension of Hash
|
20
|
+
is provided if you wish to use it, simply require `core_ext/hash/purple_hash`
|
21
|
+
and call `#to_purple_hash` on any Ruby hash to get a `PurpleHash` back.
|
29
22
|
|
30
23
|
**Note:** If you try to change the default value on a `PurpleHash` a `RuntimeError`
|
31
24
|
will be raised informing you that this is not allowed.
|
32
25
|
|
33
26
|
## API
|
34
27
|
|
35
|
-
PurpleHash provides a very basic API on top of what Hash already provides.
|
28
|
+
`PurpleHash` provides a very basic API on top of what Hash already provides.
|
36
29
|
|
37
30
|
### `#configure_from_hash(hash)`
|
38
31
|
|
data/Rakefile
CHANGED
@@ -2,8 +2,8 @@ require 'rubygems'
|
|
2
2
|
require 'bundler/setup'
|
3
3
|
require 'rspec/core/rake_task'
|
4
4
|
|
5
|
-
desc 'Run
|
5
|
+
desc 'Run purple_hash unit tests.'
|
6
6
|
task default: :spec
|
7
7
|
|
8
|
-
desc 'Run
|
8
|
+
desc 'Run purple_hash unit tests.'
|
9
9
|
RSpec::Core::RakeTask.new
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: purple_hash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-05-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- Gemfile.lock
|
70
70
|
- lib/purple_hash.rb
|
71
71
|
- LICENSE
|
72
|
+
- CHANGELOG
|
72
73
|
- Rakefile
|
73
74
|
- README.md
|
74
75
|
- spec/purple_hash_spec.rb
|