Skip to content

Commit

Permalink
Merge pull request #181 from scrapinghub/doc-rules
Browse files Browse the repository at this point in the history
Reword the introduction of the Rules page
  • Loading branch information
kmike authored Jun 19, 2023
2 parents a249c3c + d339dd9 commit 4b8f14d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/page-objects/rules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Rules

Rules are :class:`~.ApplyRule` objects that tell web-poet which :ref:`page
object class <page-object-classes>` to use based on user input, i.e. the target
URL and an output class (a :ref:`page object class <page-object-classes>` or an
:ref:`item class <items>`).
URL and the requested output class (a :ref:`page object class
<page-object-classes>` or an :ref:`item class <items>`).

Rules are necessary if you want to use an item class as output class, because
they indicate which page object class to use to generate a given item class.
Rules can also be useful as documentation or to get information about page
object classes programmatically.
Rules are necessary if you want to request an item instance, because rules tell
web-poet which page object class to use to generate your item instance. Rules
can also be useful as documentation or to get information about page object
classes programmatically.

:ref:`Rule precedence <rule-precedence>` can also be useful. For example, to
implement generic page object classes that you can override for specific
Expand Down

0 comments on commit 4b8f14d

Please sign in to comment.