Module: Curl
- Defined in:
- lib/curl/spawn.rb,
lib/curl/spawn/args.rb,
lib/curl/spawn/example.rb,
lib/curl/spawn/version.rb,
lib/curl/spawn/args_builder.rb
Defined Under Namespace
Modules: Spawn
Class Method Summary collapse
- .encode_form(form) ⇒ Object (also: form_encode, encode_www_form)
- .encode_form_component(str, enc = nil) ⇒ Object (also: encode_www_form_component)
- .encode_url(str) ⇒ Object (also: url_encode)
-
.spawn(*supplied_argv, &block) ⇒ Object
Synopsis: Curses.spawn( *positional_args [, spawn_options_hash]) Note: If only one hash is supplied, it is assumed to be an options hash, not an environment hash (see Kernel.spawn).
Class Method Details
.encode_form(form) ⇒ Object Also known as: form_encode, encode_www_form
55 56 57 |
# File 'lib/curl/spawn.rb', line 55 def self.encode_form(form) URI.encode_www_form(form) end |
.encode_form_component(str, enc = nil) ⇒ Object Also known as: encode_www_form_component
63 64 65 |
# File 'lib/curl/spawn.rb', line 63 def self.encode_form_component(str, enc=nil) URL.encode_www_form_component(str, enc) end |
.encode_url(str) ⇒ Object Also known as: url_encode
48 49 50 |
# File 'lib/curl/spawn.rb', line 48 def self.encode_url(str) ERB::Util.url_encode(str) end |
.spawn(*supplied_argv, &block) ⇒ Object
Synopsis: Curses.spawn( *positional_args [, spawn_options_hash]) Note: If only one hash is supplied, it is assumed to be an options hash, not
an environment hash (see Kernel.spawn).
42 43 44 45 46 |
# File 'lib/curl/spawn.rb', line 42 def self.spawn(*supplied_argv, &block) built_args = Curl::Spawn.build_args(&block) normalized_argv = Curl::Spawn.merge_args(supplied_argv, built_args) Kernel.spawn(*normalized_argv) end |