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_monadic-0.0.36 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.35 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.34 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.33 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.32 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.31 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.30 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.29 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.28 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.27 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.26 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.25 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.24 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.23 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.22 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.21 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.20 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.19 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.18 src/main/scala/s3/website/Ruby.scala
s3_website_monadic-0.0.16 src/main/scala/s3/website/Ruby.scala