Class: Vte::Regex
- Inherits:
-
Object
- Object
- Vte::Regex
- Defined in:
- lib/vte4/regex.rb
Instance Method Summary collapse
-
#initialize(pattern, compile_flags, options) ⇒ Regex
constructor
A new instance of Regex.
- #initialize_raw ⇒ Object
Constructor Details
#initialize(pattern, compile_flags, options) ⇒ Regex
Returns a new instance of Regex.
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/vte4/regex.rb', line 20 def initialize(pattern, compile_flags, ) flags = parse_compile_flags(compile_flags) if [:for_match] initialize_new_for_match(pattern, pattern.bytesize, flags) elsif [:for_search] initialize_new_for_search(pattern, pattern.bytesize, flags) else raise(ArgumentError, "must specify usage :for_match or :for_search: #{.inspect}") end end |
Instance Method Details
#initialize_raw ⇒ Object
19 |
# File 'lib/vte4/regex.rb', line 19 alias_method :initialize_raw, :initialize |