Skip to content
This repository
Browse code

call-seq directive makes rdoc cry and replaces method names with a cu…

…rly brace; besides it doesn't add anything when you only list one call example since this is obviously documented already
  • Loading branch information...
commit 60de0e56b7f57f0052d7e4f43bd2ef9e363c6a1a 1 parent 6398eba
Joost Baaij tilsammans authored
15 actionpack/lib/action_controller/vendor/html-scanner/html/selector.rb
@@ -207,18 +207,12 @@ class InvalidSelectorError < StandardError #:nodoc:
207 207
208 208 class << self
209 209
210   - # :call-seq:
211   - # Selector.for_class(cls) => selector
212   - #
213 210 # Creates a new selector for the given class name.
214 211 def for_class(cls)
215 212 self.new([".?", cls])
216 213 end
217 214
218 215
219   - # :call-seq:
220   - # Selector.for_id(id) => selector
221   - #
222 216 # Creates a new selector for the given id.
223 217 def for_id(id)
224 218 self.new(["#?", id])
@@ -227,9 +221,6 @@ def for_id(id)
227 221 end
228 222
229 223
230   - # :call-seq:
231   - # Selector.new(string, [values ...]) => selector
232   - #
233 224 # Creates a new selector from a CSS 2 selector expression.
234 225 #
235 226 # The first argument is the selector expression. All other arguments
@@ -342,9 +333,6 @@ def initialize(selector, *values)
342 333 end
343 334
344 335
345   - # :call-seq:
346   - # match(element, first?) => array or nil
347   - #
348 336 # Matches an element against the selector.
349 337 #
350 338 # For a simple selector this method returns an array with the
@@ -434,9 +422,6 @@ def match(element, first_only = false)
434 422 end
435 423
436 424
437   - # :call-seq:
438   - # select(root) => array
439   - #
440 425 # Selects and returns an array with all matching elements, beginning
441 426 # with one node and traversing through all children depth-first.
442 427 # Returns an empty array if no match is found.
37 actionpack/lib/action_dispatch/testing/assertions/selector.rb
@@ -9,7 +9,7 @@ module ActionDispatch
9 9 module Assertions
10 10 NO_STRIP = %w{pre script style textarea}
11 11
12   - # Adds the +assert_select+ method for use in Rails functional
  12 + # Adds the +assert_select+ method for use in \Rails functional
13 13 # test cases, which can be used to make assertions on the response HTML of a controller
14 14 # action. You can also call +assert_select+ within another +assert_select+ to
15 15 # make assertions on elements selected by the enclosing assertion.
@@ -18,16 +18,12 @@ module Assertions
18 18 # from the response HTML or elements selected by the enclosing assertion.
19 19 #
20 20 # In addition to HTML responses, you can make the following assertions:
21   - # * +assert_select_rjs+ - Assertions on HTML content of RJS update and insertion operations.
22   - # * +assert_select_encoded+ - Assertions on HTML encoded inside XML, for example for dealing with feed item descriptions.
23   - # * +assert_select_email+ - Assertions on the HTML body of an e-mail.
  21 + # * +assert_select_rjs+ - \Assertions on HTML content of RJS update and insertion operations.
  22 + # * +assert_select_encoded+ - \Assertions on HTML encoded inside XML, for example for dealing with feed item descriptions.
  23 + # * +assert_select_email+ - \Assertions on the HTML body of an e-mail.
24 24 #
25 25 # Also see HTML::Selector to learn how to use selectors.
26 26 module SelectorAssertions
27   - # :call-seq:
28   - # css_select(selector) => array
29   - # css_select(element, selector) => array
30   - #
31 27 # Select and return all matching elements.
32 28 #
33 29 # If called with a single argument, uses that argument as a selector
@@ -39,7 +35,7 @@ module SelectorAssertions
39 35 # base element and any of its children. Returns an empty array if no
40 36 # match is found.
41 37 #
42   - # The selector may be a CSS selector expression (String), an expression
  38 + # The selector may be a CSS selector expression (string), an expression
43 39 # with substitution values (Array) or an HTML::Selector object.
44 40 #
45 41 # ==== Examples
@@ -99,10 +95,6 @@ def css_select(*args)
99 95 selector.select(root)
100 96 end
101 97
102   - # :call-seq:
103   - # assert_select(selector, equality?, message?)
104   - # assert_select(element, selector, equality?, message?)
105   - #
106 98 # An assertion that selects elements and makes one or more equality tests.
107 99 #
108 100 # If the first argument is an element, selects all matching elements
@@ -132,7 +124,7 @@ def css_select(*args)
132 124 # assert_select "li", 8
133 125 # end
134 126 #
135   - # The selector may be a CSS selector expression (String), an expression
  127 + # The selector may be a CSS selector expression (string), an expression
136 128 # with substitution values, or an HTML::Selector object.
137 129 #
138 130 # === Equality Tests
@@ -140,11 +132,11 @@ def css_select(*args)
140 132 # The equality test may be one of the following:
141 133 # * <tt>true</tt> - Assertion is true if at least one element selected.
142 134 # * <tt>false</tt> - Assertion is true if no element selected.
143   - # * <tt>String/Regexp</tt> - Assertion is true if the text value of at least
  135 + # * <tt>string/Regexp</tt> - Assertion is true if the text value of at least
144 136 # one element matches the string or regular expression.
145   - # * <tt>Integer</tt> - Assertion is true if exactly that number of
  137 + # * <tt>integer</tt> - Assertion is true if exactly that number of
146 138 # elements are selected.
147   - # * <tt>Range</tt> - Assertion is true if the number of selected
  139 + # * <tt>range</tt> - Assertion is true if the number of selected
148 140 # elements fit the range.
149 141 # If no equality test specified, the assertion is true if at least one
150 142 # element selected.
@@ -332,11 +324,6 @@ def count_description(min, max, count) #:nodoc:
332 324 end
333 325 end
334 326
335   - # :call-seq:
336   - # assert_select_rjs(id?) { |elements| ... }
337   - # assert_select_rjs(statement, id?) { |elements| ... }
338   - # assert_select_rjs(:insert, position, id?) { |elements| ... }
339   - #
340 327 # Selects content from the RJS response.
341 328 #
342 329 # === Narrowing down
@@ -474,9 +461,6 @@ def assert_select_rjs(*args, &block)
474 461 end
475 462 end
476 463
477   - # :call-seq:
478   - # assert_select_encoded(element?) { |elements| ... }
479   - #
480 464 # Extracts the content of an element, treats it as encoded HTML and runs
481 465 # nested assertion on it.
482 466 #
@@ -543,9 +527,6 @@ def assert_select_encoded(element = nil, &block)
543 527 end
544 528 end
545 529
546   - # :call-seq:
547   - # assert_select_email { }
548   - #
549 530 # Extracts the body of an email and runs nested assertions on it.
550 531 #
551 532 # You must enable deliveries for this assertion to work, use:
3  activerecord/lib/active_record/persistence.rb
@@ -18,9 +18,6 @@ def persisted?
18 18 !(new_record? || destroyed?)
19 19 end
20 20
21   - # :call-seq:
22   - # save(options)
23   - #
24 21 # Saves the model.
25 22 #
26 23 # If the model is new a record gets created in the database, otherwise

0 comments on commit 60de0e5

Please sign in to comment.
Something went wrong with that request. Please try again.