Class: Blitz::Curl
- Inherits:
-
Object
- Object
- Blitz::Curl
- Extended by:
- Utils
- Defined in:
- lib/blitz/curl/rush.rb,
lib/blitz/curl.rb,
lib/blitz/curl/error.rb,
lib/blitz/curl/sprint.rb
Overview
:nodoc:
Defined Under Namespace
Constant Summary collapse
- RE_WS =
/^\s+/.freeze
- RE_NOT_WS =
/^[^\s]+/.freeze
- RE_DQ_STRING =
/^"[^"\\\r\n]*(?:\\.[^"\\\r\n]*)*"/.freeze
- RE_SQ_STRING =
/^'[^'\\\r\n]*(?:\\.[^'\\\r\n]*)*'/.freeze
Class Method Summary collapse
Methods included from Utils
Class Method Details
.parse(arguments) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/blitz/curl.rb', line 12 def self.parse arguments argv = arguments.is_a?(Array) ? arguments : xargv(arguments) args = parse_cli argv raise "help" if args['help'] if not args['pattern'] Blitz::Curl::Sprint.new args else Blitz::Curl::Rush.new args end end |