Class: BSON::Regexp::Raw
- Inherits:
-
Object
- Object
- BSON::Regexp::Raw
- Defined in:
- lib/bson/regexp.rb
Overview
Represents the raw values for the regular expression.
Instance Attribute Summary collapse
-
#options ⇒ Integer
readonly
Options The options.
-
#pattern ⇒ String
readonly
Pattern The regex pattern.
Instance Method Summary collapse
-
#compile ⇒ ::Regexp
Compile the Regular expression into the native type.
-
#initialize(pattern, options) ⇒ Raw
constructor
Initialize the new raw regular expression.
Constructor Details
#initialize(pattern, options) ⇒ Raw
Initialize the new raw regular expression.
119 120 121 122 |
# File 'lib/bson/regexp.rb', line 119 def initialize(pattern, ) @pattern = pattern @options = end |
Instance Attribute Details
#options ⇒ Integer (readonly)
Returns options The options.
96 97 98 |
# File 'lib/bson/regexp.rb', line 96 def @options end |
#pattern ⇒ String (readonly)
Returns pattern The regex pattern.
93 94 95 |
# File 'lib/bson/regexp.rb', line 93 def pattern @pattern end |
Instance Method Details
#compile ⇒ ::Regexp
Compile the Regular expression into the native type.
106 107 108 |
# File 'lib/bson/regexp.rb', line 106 def compile @compiled ||= ::Regexp.new(pattern, ) end |