Class: String
Overview
accessibility-core
extensions to the String
class
Instance Method Summary collapse
-
#to_data ⇒ Object
misc freedom patches.
-
#to_url ⇒ URI::Generic
Parse the receiver into a
URI
object.
Instance Method Details
#to_data ⇒ Object
misc freedom patches
741 742 743 744 745 746 747 748 749 750 |
# File 'ext/accessibility/bridge/bridge.c', line 741
static
VALUE
rb_str_to_data(VALUE self)
{
NSData* data = [NSData dataWithBytes:(void*)StringValuePtr(self)
length:RSTRING_LEN(self)];
if (data)
return wrap_nsdata(data);
return Qnil; // I don't think this is possible except in case of ENOMEM
}
|
#to_url ⇒ URI::Generic
Parse the receiver into a URI
object
151 152 153 |
# File 'lib/accessibility/bridge/mri.rb', line 151 def to_url URI.parse self end |