hypermedia 1.0.4 → 1.0.5

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/api/document.rb +3 -3
  2. metadata +1 -1
data/lib/api/document.rb CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  class HypermediaAPI::Document
4
4
  def entity (klass)
5
- article = @document.css("article.#{klass.name.underscore}").first
5
+ article = @document.at_css("article.#{klass.name.underscore}")
6
6
  return nil unless article
7
7
 
8
- klass.new_from_fields(article.css('code'))
8
+ klass.new_from_fields(article.element_children.filter('code'))
9
9
  end
10
10
 
11
11
  def entities (klass)
12
12
  articles = @document.css("article.#{klass.name.underscore}")
13
- articles.map {|article| klass.new_from_fields(article.css('code')) }
13
+ articles.map {|article| klass.new_from_fields(article.element_children.filter('code')) }
14
14
  end
15
15
 
16
16
  def form (css_selector)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hypermedia
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: