Exception: WebStruct::JavaScriptRequiredError
- Inherits:
-
StandardError
- Object
- StandardError
- WebStruct::JavaScriptRequiredError
- Defined in:
- lib/webstruct/errors.rb
Overview
Exception raised when HTML appears to be a client-rendered shell (little or no server-rendered body text) so static parsing would be misleading. Match details are exposed via #signals; see Shell.
Instance Attribute Summary collapse
-
#signals ⇒ Array<Symbol>
readonly
Heuristic flags that contributed to rejecting the document.
Instance Method Summary collapse
-
#initialize(signals = []) ⇒ void
constructor
Records which shell heuristics fired and freezes them on the exception.
Constructor Details
#initialize(signals = []) ⇒ void
Records which shell heuristics fired and freezes them on the exception.
39 40 41 42 |
# File 'lib/webstruct/errors.rb', line 39 def initialize(signals = []) @signals = signals.freeze super("Page appears to require JavaScript to render meaningful content.") end |
Instance Attribute Details
#signals ⇒ Array<Symbol> (readonly)
Returns heuristic flags that contributed to rejecting the document.
33 34 35 |
# File 'lib/webstruct/errors.rb', line 33 def signals @signals end |