pub fn call(&self, arguments: &[AnyObject]) -> AnyObject {
        let arguments = util::arguments_to_values(arguments);
        let result = rproc::call(self.value(), &arguments);

        AnyObject::from(result)
    }
/// Calls a proc with given arguments
///
/// # Examples
///
/// ```no_run
/// #[macro_use]
/// extern crate rutie;
///
/// use rutie::{Class, Object, Proc, RString};
///
/// class!(Greeter);
///
/// methods!(
///     Greeter,
///     rtself,
///
///     fn greet_rust_with(greeting_template: Proc) -> RString {
///         let name = RString::new_utf8("Rust").to_any_object();
///         let rendered_template = greeting_template.unwrap().call(&[name]);
///
///         rendered_template.try_convert_to::<RString>().unwrap()
///     }
/// );
///
/// fn main() {
///     Class::new("Greeter", None).define(|klass| {
///         klass.def_self("greet_rust_with", greet_rust_with);
///     });
/// }
/// ```
///
/// Ruby:
///
/// ```ruby
/// class Greeter
///   def self.greet_rust_with(greeting_template)
///     greeting_template.call('Rust')
///   end
/// end
///
/// greeting_template = -> (name) { "Hello, #{name}!" }
///
/// Greeter.greet_rust_with(greeting_template) # => "Hello, Rust!"
/// ```
Calls a proc with given arguments
Calls a proc with given arguments
pub fn call(&self, arguments: &[AnyObject]) -> AnyObject {
        let arguments = util::arguments_to_values(arguments);
        let result = rproc::call(self.value(), &arguments);
        AnyObject::from(result)
    }
pub fn call ( & self , arguments : & [ AnyObject ] ) -> AnyObject { let arguments = util :: arguments_to_values ( arguments ) ; let result = rproc :: call ( self . value ( ) , & arguments ) ; AnyObject :: from ( result ) }
Calls a proc with given arguments
Calls a proc with given arguments
&self
arguments
&[AnyObject]
&self
arguments
&[AnyObject]
examples
None
[macro_use]
extern crate rutie.

use rutie::{Class, Object, Proc, RString}.

class!(Greeter).

methods!(
Greeter,
rtself.

fn greet_rust_with(greeting_template: Proc) -> RString {
let name = RString::new_utf8("Rust").to_any_object();
let rendered_template = greeting_template.unwrap().call(&[name]).

rendered_template.try_convert_to::().unwrap()
}
).

fn main() {
Class::new("Greeter", None).define(|klass| {
klass.def_self("greet_rust_with", greet_rust_with);
});
}
```



```ruby
class Greeter
def self.greet_rust_with(greeting_template)
greeting_template.call('Rust')
end
end

greeting_template = -> (name) { "Hello, #{name}!" }

Greeter.greet_rust_with(greeting_template) # => "Hello, Rust!"
```
extern crate rutie . use rutie :: { Class Object Proc RString } . class! ( Greeter ) . methods! ( Greeter rtself . fn greet_rust_with ( greeting_template : Proc ) - > RString { let name = RString :: new_utf8 ( " Rust " ) . to_any_object () ; let rendered_template = greeting_template . unwrap () . call ( & [ name ] ) . rendered_template . try_convert_to :: () . unwrap () } ) . fn main () { Class :: new ( " Greeter " None ) . define ( |klass| { klass . def_self ( " greet_rust_with " greet_rust_with ) ; } ) ; } ` ` ` ` ` ` ruby class Greeter def self . greet_rust_with ( greeting_template ) greeting_template . call ( ' Rust ' ) end end greeting_template = - > ( name ) { " Hello # { name } ! " } Greeter . greet_rust_with ( greeting_template ) # = > " Hello Rust! " ` ` `