ribbon 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/ribbon.rb +6 -6
  2. data/lib/ribbon/version.rb +1 -1
  3. metadata +3 -3
@@ -30,7 +30,11 @@ class Ribbon < BasicObject
30
30
 
31
31
  # Gets a value by key.
32
32
  def [](key)
33
- __hash__[key]
33
+ __hash__[key] = if __hash__.has_key? key
34
+ ::Ribbon.convert __hash__[key]
35
+ else
36
+ ::Ribbon.new
37
+ end
34
38
  end
35
39
 
36
40
  # Sets a value by key.
@@ -52,11 +56,7 @@ class Ribbon < BasicObject
52
56
  when '?'
53
57
  self[m] ? true : false
54
58
  else
55
- self[method] = if __hash__.has_key? method
56
- ::Ribbon.convert self[method]
57
- else
58
- ::Ribbon.new
59
- end
59
+ self[method]
60
60
  end
61
61
  end
62
62
 
@@ -16,7 +16,7 @@ class Ribbon < BasicObject
16
16
  # Patch version.
17
17
  #
18
18
  # Increments denote changes in implementation.
19
- PATCH = 2
19
+ PATCH = 3
20
20
 
21
21
  # Build version.
22
22
  #
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ribbon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-12-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rookie
16
- requirement: &5737360 !ruby/object:Gem::Requirement
16
+ requirement: &7328560 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *5737360
24
+ version_requirements: *7328560
25
25
  description: Ruby Object Notation. Inspired by JSON and OpenStruct.
26
26
  email: matheus.a.m.moreira@gmail.com
27
27
  executables: []