jsonpath 0.2.3 → 0.3.0

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.
data/Rakefile CHANGED
@@ -9,8 +9,6 @@ Rake::RDocTask.new do |rd|
9
9
  rd.rdoc_dir = 'rdoc'
10
10
  end
11
11
 
12
- require 'rubygems'
13
-
14
12
  require 'rspec/core/rake_task'
15
13
  RSpec::Core::RakeTask.new(:spec)
16
14
 
@@ -45,6 +45,10 @@ class JsonPath
45
45
  end
46
46
 
47
47
  def on(object)
48
+ enum_on(object).to_a
49
+ end
50
+
51
+ def enum_on(object)
48
52
  JsonPath::Enumerable.new(self, object)
49
53
  end
50
54
 
@@ -42,7 +42,6 @@ class JsonPath
42
42
  end
43
43
  end
44
44
  else
45
- #p "#{node.inspect} ---> node #{@path[pos]}"
46
45
  blk.call(node) if pos == (@path.size - 1) && node && eval("node #{@path[pos]}")
47
46
  end
48
47
 
@@ -1,3 +1,3 @@
1
1
  class JsonPath
2
- VERSION = '0.2.3'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonpath
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
8
  - 3
10
- version: 0.2.3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joshua Hull
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-05-11 00:00:00 -07:00
18
+ date: 2011-06-06 00:00:00 -07:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency