Class: AutoPilot::Request
- Inherits:
-
Object
- Object
- AutoPilot::Request
- Includes:
- HTTParty
- Defined in:
- lib/auto_pilot/request.rb
Instance Attribute Summary collapse
-
#document ⇒ Object
readonly
Returns the value of attribute document.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
- #get_document(url) ⇒ Object
-
#initialize(url, options = {}) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(url, options = {}) ⇒ Request
Returns a new instance of Request.
20 21 22 23 |
# File 'lib/auto_pilot/request.rb', line 20 def initialize(url, = {}) @url, @options = AutoPilot::URLFormatter.default_to_http(url), @document = get_document(url) end |
Instance Attribute Details
#document ⇒ Object (readonly)
Returns the value of attribute document.
18 19 20 |
# File 'lib/auto_pilot/request.rb', line 18 def document @document end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
18 19 20 |
# File 'lib/auto_pilot/request.rb', line 18 def error @error end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
18 19 20 |
# File 'lib/auto_pilot/request.rb', line 18 def @options end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
18 19 20 |
# File 'lib/auto_pilot/request.rb', line 18 def url @url end |