hashlib 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/hashlib.rb +0 -29
  2. metadata +1 -1
@@ -43,35 +43,6 @@ class Hash
43
43
  end
44
44
  end
45
45
 
46
- def find(path, default=nil)
47
- root = self
48
-
49
- begin
50
- if not path.is_a?(Array)
51
- path = path.to_s.strip.scan(/[a-z0-9\@\_\-\+]+(?:\[[^\]]+\])?/).to_a
52
- end
53
-
54
- path.each do |p|
55
- x, key, subfield, subvalue = p.to_s.split(/([a-z0-9\@\_\-\+]+)(?:\[([^=]+)(?:=(.+))?\])?/i)
56
- root = (root[key.to_s] rescue nil)
57
- #puts key, root.inspect
58
-
59
- if subfield and root.is_a?(Array)
60
- root.each do |r|
61
- if r.is_a?(Hash) and r[subfield.to_s] and ( (subvalue && r[subfield.to_s].to_s == subvalue) || true)
62
- root = r
63
- break
64
- end
65
- end
66
- end
67
- end
68
-
69
- return (root.nil? ? default : root)
70
- rescue NoMethodError
71
- return default
72
- end
73
- end
74
-
75
46
  def set(path, value)
76
47
  if not path.is_a?(Array)
77
48
  path = path.strip.split(/[\/\.]/)
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.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: