Module: JrubyScala::CoreExt::Proc::Conversions

Included in:
Proc
Defined in:
lib/jruby_scala/core_ext/proc/conversions.rb

Instance Method Summary collapse

Instance Method Details

#to_functionJrubyScala::CoreExt::Proc::Function Also known as: java_object, scala_object

Converts a Proc object into a Scala function of the same arity

Returns:

  • (JrubyScala::CoreExt::Proc::Function)

    A Scala-compatible proc



10
11
12
# File 'lib/jruby_scala/core_ext/proc/conversions.rb', line 10

def to_function
  eval "Function#{arity}.new(self)"
end