This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome, would you like some coffee? | |
{{#drinks?}} | |
We can offer some of this: | |
{{#drinks}} | |
{{name}} | |
{{#alcohol?}} | |
(only if you older 21) | |
{{/alcohol?}} | |
{{/drinks}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
drinks?: true | |
drinks: [] | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome, would you like some milk? | |
We can offer some of this: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
drinks?: true | |
drinks: | |
- { name: wine, alcohol?: true } | |
- { name: milk } | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome, would you like some milk? | |
We can offer some of this: | |
wine | |
(only if you older 21) | |
milk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
drinks?: true | |
drinks: | |
- { name: wine } | |
- { name: milk, alcohol?: false } | |
alcohol?: true | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome, would you like some milk? | |
We can offer some of this: | |
wine | |
(only if you older 21) | |
milk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
drinks?: true | |
drinks: { name: wine, alcohol?: true } | |
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome, would you like some milk? | |
We can offer some of this: | |
wine | |
(only if you older 21) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FooBarVendor::ItemScraper < Scraper | |
# подключаем самописный DSL для работы с HTML | |
include Makhno | |
# присутствие строго одного элемента | |
one :title, | |
css: '.product-details .product-content > h1', | |
# перед manipulate, элемент будет преобразован в значение | |
value: ->(e) { e.text.strip } |
OlderNewer