Method: Inspec::Resources::Http#initialize
- Defined in:
- lib/resources/http.rb
#initialize(url, opts = {}) ⇒ Http
Returns a new instance of Http.
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/resources/http.rb', line 33 def initialize(url, opts = {}) @url = url @opts = opts if use_remote_worker? return skip_resource 'curl is not available on the target machine' unless inspec.command('curl').exist? @worker = Worker::Remote.new(inspec, http_method, url, opts) else @worker = Worker::Local.new(http_method, url, opts) end end |