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
URIobject.
Instance Method Details
#to_data ⇒ Object
misc freedom patches
712 713 714 715 716 717 718 719 720 721 722 |
# File 'ext/accessibility/bridge/bridge.c', line 712 static VALUE rb_str_to_data(const VALUE self) { VALUE self_string = self; NSData* const data = [NSData dataWithBytes:(void*)StringValuePtr(self_string) 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 |