diff options
author | AvnerCohen <israbirding@gmail.com> | 2012-10-29 13:10:53 +0200 |
---|---|---|
committer | AvnerCohen <israbirding@gmail.com> | 2012-10-29 13:10:53 +0200 |
commit | be4a4cd38ff2c2db0f6b69bb72fb3557bd5a6e21 (patch) | |
tree | d7b6d29f22d5ce3aeef2a293b8ea5d55f9257868 /actionpack/lib/action_view/vendor/html-scanner/html | |
parent | 20c574ca85e380d06c2e0f148301177a9b197b2e (diff) | |
download | rails-be4a4cd38ff2c2db0f6b69bb72fb3557bd5a6e21.tar.gz rails-be4a4cd38ff2c2db0f6b69bb72fb3557bd5a6e21.tar.bz2 rails-be4a4cd38ff2c2db0f6b69bb72fb3557bd5a6e21.zip |
Hash Syntax to 1.9 related changes
Diffstat (limited to 'actionpack/lib/action_view/vendor/html-scanner/html')
-rw-r--r-- | actionpack/lib/action_view/vendor/html-scanner/html/node.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/actionpack/lib/action_view/vendor/html-scanner/html/node.rb b/actionpack/lib/action_view/vendor/html-scanner/html/node.rb index 4e1f016431..7e7cd4f7b6 100644 --- a/actionpack/lib/action_view/vendor/html-scanner/html/node.rb +++ b/actionpack/lib/action_view/vendor/html-scanner/html/node.rb @@ -383,32 +383,32 @@ module HTML #:nodoc: # Usage: # # # test if the node is a "span" tag - # node.match :tag => "span" + # node.match tag: "span" # # # test if the node's parent is a "div" - # node.match :parent => { :tag => "div" } + # node.match parent: { tag: "div" } # # # test if any of the node's ancestors are "table" tags - # node.match :ancestor => { :tag => "table" } + # node.match ancestor: { tag: "table" } # # # test if any of the node's immediate children are "em" tags - # node.match :child => { :tag => "em" } + # node.match child: { tag: "em" } # # # test if any of the node's descendants are "strong" tags - # node.match :descendant => { :tag => "strong" } + # node.match descendant: { tag: "strong" } # # # test if the node has between 2 and 4 span tags as immediate children - # node.match :children => { :count => 2..4, :only => { :tag => "span" } } + # node.match children: { count: 2..4, only: { tag: "span" } } # # # get funky: test to see if the node is a "div", has a "ul" ancestor # # and an "li" parent (with "class" = "enum"), and whether or not it has # # a "span" descendant that contains # text matching /hello world/: - # node.match :tag => "div", - # :ancestor => { :tag => "ul" }, - # :parent => { :tag => "li", - # :attributes => { :class => "enum" } }, - # :descendant => { :tag => "span", - # :child => /hello world/ } + # node.match tag: "div", + # ancestor: { tag: "ul" }, + # parent: { tag: "li", + # attributes: { class: "enum" } }, + # descendant: { tag: "span", + # child: /hello world/ } def match(conditions) conditions = validate_conditions(conditions) # check content of child nodes |