Module: AeEasy::Core::Plugin::ParserBehavior
- Includes:
- ContextIntegrator
- Included in:
- Parser
- Defined in:
- lib/ae_easy/core/plugin/parser_behavior.rb
Instance Attribute Summary
Attributes included from ContextIntegrator
Instance Method Summary collapse
-
#enqueue(pages) ⇒ Object
Enqueue a single/multiple pages for fetch.
-
#save(outputs) ⇒ Object
Save a single/multiple outputs.
-
#vars ⇒ Object
Alias to `page`.
Methods included from ContextIntegrator
#initialize_hook_core_context_integrator, #mock_context
Instance Method Details
#enqueue(pages) ⇒ Object
Note:
Instance must implement:
-
`save_pages(pages)`
Enqueue a single/multiple pages for fetch. Analog to `save_pages`.
13 14 15 16 |
# File 'lib/ae_easy/core/plugin/parser_behavior.rb', line 13 def enqueue pages pages = [pages] unless pages.is_a? Array save_pages pages end |
#save(outputs) ⇒ Object
Note:
Instance must implement:
-
`save_outputs(outputs)`
Save a single/multiple outputs. Analog to `save_outputs`.
24 25 26 27 |
# File 'lib/ae_easy/core/plugin/parser_behavior.rb', line 24 def save outputs outputs = [outputs] unless outputs.is_a? Array save_outputs outputs end |
#vars ⇒ Object
Note:
Instance must implement:
-
`page`
Alias to `page`.
33 34 35 |
# File 'lib/ae_easy/core/plugin/parser_behavior.rb', line 33 def vars page['vars'] end |