Sha256: 6ef9270a1dc65b6f50912272446e71ec713fc02fab9e8bf4b5de043e13ca2474

Contents?: true

Size: 358 Bytes

Versions: 28

Compression:

Stored size: 358 Bytes

Contents

package s3.website

object Ruby {
  lazy val rubyRuntime = org.jruby.Ruby.newInstance() // Instantiate heavy object

  def rubyRegexMatches(text: String, regex: String) = {
    val z  = rubyRuntime.evalScriptlet(
      s"""# encoding: utf-8
          !!Regexp.new("$regex").match("$text")"""
    )
    z.toJava(classOf[Boolean]).asInstanceOf[Boolean]
  }

}

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
s3_website-2.11.2 src/main/scala/s3/website/Ruby.scala
s3_website-2.11.1 src/main/scala/s3/website/Ruby.scala
s3_website-2.11.0 src/main/scala/s3/website/Ruby.scala
s3_website-2.10.0 src/main/scala/s3/website/Ruby.scala
s3_website-2.9.0 src/main/scala/s3/website/Ruby.scala
s3_website-2.8.6 src/main/scala/s3/website/Ruby.scala
s3_website-2.8.5 src/main/scala/s3/website/Ruby.scala
s3_website-2.8.4 src/main/scala/s3/website/Ruby.scala