Struct rutie::Integer [−][src]
pub struct Integer { /* fields omitted */ }
Expand description
Integer
Implementations
Creates a new Integer
.
Examples
use rutie::{Integer, VM};
let integer = Integer::new(1);
assert_eq!(integer.to_i64(), 1);
Ruby:
1 == 1
Retrieves an i64
value from Integer
.
Examples
use rutie::{Integer, VM};
let integer = Integer::new(1);
assert_eq!(integer.to_i64(), 1);
Ruby:
1 == 1
Retrieves an u64
value from Integer
.
Examples
use rutie::{Integer, VM};
let integer = Integer::new(1);
assert_eq!(integer.to_u64(), 1);
Ruby:
1 == 1
Retrieves an i32
value from Integer
.
Examples
use rutie::{Integer, VM};
let integer = Integer::new(1);
assert_eq!(integer.to_i32(), 1);
Ruby:
1 == 1
Trait Implementations
Returns a singleton class of current object. Read more
Gets an immutable reference to the Rust structure which is wrapped into a Ruby object. Read more
Gets a mutable reference to the Rust structure which is wrapped into a Ruby object.
Defines an instance method for the given class or object. Read more
Defines a private instance method for the given class or object. Read more
Defines a class method for given class or singleton method for object. Read more
An alias for define_method
(similar to Ruby syntax def some_method
).
An alias for define_private_method
(similar to Ruby syntax private def some_method
).
An alias for define_singleton_method
(similar to Ruby def self.some_method
).
Calls a given method on an object similarly to Ruby Object#send
method Read more
Checks whether the object responds to given method Read more
fn protect_send(
&self,
method: &str,
arguments: &[AnyObject]
) -> Result<AnyObject, AnyException>
fn protect_send(
&self,
method: &str,
arguments: &[AnyObject]
) -> Result<AnyObject, AnyException>
protect_send
returns Result<AnyObject, AnyObject> Read more
fn protect_public_send(
&self,
method: &str,
arguments: &[AnyObject]
) -> Result<AnyObject, AnyException>
fn protect_public_send(
&self,
method: &str,
arguments: &[AnyObject]
) -> Result<AnyObject, AnyException>
protect_public_send
returns Result<AnyObject, AnyObject> Read more
Converts struct to AnyObject
Read more
Gets an instance variable of object Read more
Sets an instance variable for object Read more
Unsafely casts current object to the specified Ruby type Read more
Safely casts current object to the specified Ruby type Read more