hashlib 0.0.22 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/hashlib.rb +9 -4
  2. metadata +1 -1
data/lib/hashlib.rb CHANGED
@@ -13,6 +13,14 @@ class Hash
13
13
  end
14
14
 
15
15
  def get(path, default=nil)
16
+ rget(path, default)
17
+ end
18
+
19
+ def set(path, value)
20
+ rset(path, value)
21
+ end
22
+
23
+ def rget(path, default=nil)
16
24
  rv = self
17
25
 
18
26
  # make path an array if not already
@@ -74,7 +82,7 @@ class Hash
74
82
  return rv
75
83
  end
76
84
 
77
- def set(path, value)
85
+ def rset(path, value)
78
86
  if not path.is_a?(Array)
79
87
  path = path.to_s.strip.split(/[\/\.]/)
80
88
  end
@@ -220,9 +228,6 @@ class Hash
220
228
  end
221
229
  return rv
222
230
  end
223
-
224
- alias_method :set, :rset
225
- alias_method :get, :rget
226
231
  end
227
232
 
228
233
  class Array
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashlib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: