escape

escape(str) Instance Public methods

abbrev

abbrev(words, pattern = nil) Class Public methods Given a set of strings, calculate the set of unambiguous abbreviations for those strings, and return a hash where the keys are all the possible abbreviations and the values are the full strings. Thus, given words is âcarâ and âconeâ, the keys pointing to âcarâ would be âcaâ and âcarâ, while those pointing to âconeâ would be âcoâ, âconâ, and âconeâ. require 'abbrev' Abbrev.abbrev(['car', 'cone']) #=> {"ca"=>"car", "con"=>"c

host=

host=(v) Instance Public methods Args v String Description public setter for the host component v. (with validation) see also URI::Generic.check_host Usage require 'uri' uri = URI.parse("http://my.example.com") uri.host = "foo.com" # => "foo.com" uri #=> #<URI::HTTP:0x000000008e89e8 URL:http://foo.com>

build2

build2(args) Class Public methods Synopsis See new Description At first, tries to create a new URI::Generic instance using ::build. But, if exception URI::InvalidComponentError is raised, then it URI::Escape#escape all URI components and tries again.

values

dbm.values â array Instance Public methods Returns an array of all the string values in the database.

shellescape

shellescape(str) Class Public methods Escapes a string so that it can be safely used in a Bourne shell command line. str can be a non-string object that responds to to_s. Note that a resulted string should be used unquoted and is not intended for use in double quotes nor in single quotes. argv = Shellwords.escape("It's better to give than to receive") argv #=> "It\\'s\\ better\\ to\\ give\\ than\\ to\\ receive" String#shellescape is a shorthand for this function. argv = "It's

id2obj

id2obj(tree, id) Class Public methods

done_adding

done_adding(*) Instance Public methods Prints when RDoc is done

autoload_under

autoload_under(path) Instance Public methods

copy

copy(src, *opts) Instance Public methods Copies a region from the image called source to the image called destination, possibly with pixel zooming and/or subsampling. If no options are specified, this method copies the whole of source into destination, starting at coordinates (0,0) in destination. The following options may be specified: :from [x1, y1, x2, y2] Specifies a rectangular sub-region of the source image to be copied. (x1,y1) and (x2,y2) specify diagonally opposite corner