Module: BSON::Regexp::ClassMethods
- Defined in:
- lib/bson/regexp.rb
Overview
Class-level methods to be added to the Regexp class.
Instance Method Summary collapse
-
#from_bson(buffer, **_) ⇒ Regexp
Deserialize the regular expression from BSON.
Instance Method Details
#from_bson(buffer, **_) ⇒ Regexp
Note:
If the argument cannot be parsed, an exception will be raised and the argument will be left in an undefined state. The caller must explicitly call rewind on the buffer before trying to parse it again.
Deserialize the regular expression from BSON.
265 266 267 268 269 |
# File 'lib/bson/regexp.rb', line 265 def from_bson(buffer, **_) pattern = buffer.get_cstring = buffer.get_cstring Raw.new(pattern, ) end |