Class: String

Inherits:
Object show all
Defined in:
lib/accessibility/bridge/mri.rb

Overview

accessibility-core extensions to the String class

Instance Method Summary collapse

Instance Method Details

#to_dataObject

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_urlURI::Generic

Parse the receiver into a URI object

Returns:



151
152
153
# File 'lib/accessibility/bridge/mri.rb', line 151

def to_url
  URI.parse self
end