Class: Serverspec::Type::Curl
- Defined in:
- lib/serverspec_extra_types/types/curl.rb
Instance Method Summary collapse
- #body ⇒ Object
- #content_type ⇒ Object
- #http_code ⇒ Object
-
#initialize(name = nil, options = {}) ⇒ Curl
constructor
A new instance of Curl.
- #inspection ⇒ Object
- #response_code ⇒ Object
- #size_download ⇒ Object
- #size_upload ⇒ Object
- #url ⇒ Object
Methods inherited from ApiBase
Constructor Details
#initialize(name = nil, options = {}) ⇒ Curl
Returns a new instance of Curl.
8 9 10 11 |
# File 'lib/serverspec_extra_types/types/curl.rb', line 8 def initialize(name = nil, = {}) super(name, ) @url_base = name end |
Instance Method Details
#body ⇒ Object
21 22 23 |
# File 'lib/serverspec_extra_types/types/curl.rb', line 21 def body inspection[:body] end |
#content_type ⇒ Object
33 34 35 |
# File 'lib/serverspec_extra_types/types/curl.rb', line 33 def content_type inspection[:content_type] end |
#http_code ⇒ Object
29 30 31 |
# File 'lib/serverspec_extra_types/types/curl.rb', line 29 def http_code response_code end |
#inspection ⇒ Object
17 18 19 |
# File 'lib/serverspec_extra_types/types/curl.rb', line 17 def inspection @inspection ||= get_inspection end |
#response_code ⇒ Object
25 26 27 |
# File 'lib/serverspec_extra_types/types/curl.rb', line 25 def response_code inspection[:http_code] end |
#size_download ⇒ Object
37 38 39 |
# File 'lib/serverspec_extra_types/types/curl.rb', line 37 def size_download inspection[:size_download] end |
#size_upload ⇒ Object
41 42 43 |
# File 'lib/serverspec_extra_types/types/curl.rb', line 41 def size_upload inspection[:size_upload] end |
#url ⇒ Object
13 14 15 |
# File 'lib/serverspec_extra_types/types/curl.rb', line 13 def url @url_base end |