Class: Playwright::JavaScript::Regex
- Inherits:
-
Object
- Object
- Playwright::JavaScript::Regex
- Defined in:
- lib/playwright/javascript/regex.rb
Instance Attribute Summary collapse
-
#flag ⇒ Object
readonly
Returns the value of attribute flag.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(regexp) ⇒ Regex
constructor
A new instance of Regex.
Constructor Details
#initialize(regexp) ⇒ Regex
Returns a new instance of Regex.
4 5 6 7 8 9 10 11 |
# File 'lib/playwright/javascript/regex.rb', line 4 def initialize(regexp) unless regexp.is_a?(Regexp) raise ArgumentError("Argument must be a Regexp: #{regexp} (#{regexp.class})") end @source = regexp.source @flag = flag_for(regexp) end |
Instance Attribute Details
#flag ⇒ Object (readonly)
Returns the value of attribute flag.
13 14 15 |
# File 'lib/playwright/javascript/regex.rb', line 13 def flag @flag end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
13 14 15 |
# File 'lib/playwright/javascript/regex.rb', line 13 def source @source end |