Sha256: 2d46965c63f7ecd15b06a27bdc4db4c80caea4de9d0b6f7607ae4528be32f64c
Contents?: true
Size: 365 Bytes
Versions: 54
Compression:
Stored size: 365 Bytes
Contents
package s3.website object Ruby { lazy val rubyRuntime = org.jruby.Ruby.newInstance() // Instantiate heavy object def rubyRegexMatches(text: String, regex: String) = rubyRuntime.evalScriptlet( s""" !!Regexp.new('$regex').match('$text') # Use !! to force a boolean conversion """ ).toJava(classOf[Boolean]).asInstanceOf[Boolean] }
Version data entries
54 entries across 54 versions & 2 rubygems