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

Version Path
s3_website-2.1.15 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.14 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.13 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.12 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.11 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.10 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.9 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.8 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.7 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.6 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.5 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.4 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.3 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.2 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.1 src/main/scala/s3/website/Ruby.scala
s3_website-2.1.0 src/main/scala/s3/website/Ruby.scala
s3_website-2.0.1 src/main/scala/s3/website/Ruby.scala
s3_website-2.0.0 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.38 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.37 src/main/scala/s3/website/Ruby.scala