Module: Playwright::JavaScript
- Defined in:
- lib/playwright/javascript.rb,
lib/playwright/javascript/function.rb,
lib/playwright/javascript/expression.rb,
lib/playwright/javascript/value_parser.rb,
lib/playwright/javascript/value_serializer.rb
Defined Under Namespace
Classes: Expression, Function, ValueParser, ValueSerializer
Class Method Summary collapse
-
.function?(str) ⇒ Boolean
Detect if str is likely to be a function.
Class Method Details
.function?(str) ⇒ Boolean
Detect if str is likely to be a function
9 10 11 |
# File 'lib/playwright/javascript.rb', line 9 module_function def function?(str) ['async', 'function'].any? { |key| str.strip.start_with?(key) } || str.include?('=>') end |