Class: DataScienceTheater3000::DataScienceToolkit::Request
- Inherits:
-
Object
- Object
- DataScienceTheater3000::DataScienceToolkit::Request
- Defined in:
- lib/data_science_theater_3000/data_science_toolkit.rb
Overview
Performs a GET request to the datasciencetoolkit server
Direct Known Subclasses
Constant Summary collapse
- REQUEST_URL =
"http://www.datasciencetoolkit.org"
Instance Attribute Summary collapse
- #request_method ⇒ Object private
- #request_params ⇒ Object private
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Request
constructor
A new instance of Request.
- #result ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Request
Returns a new instance of Request.
15 16 17 18 |
# File 'lib/data_science_theater_3000/data_science_toolkit.rb', line 15 def initialize opts={} @request_method = opts.fetch(:request_method){ raise DataScienceTheater3000Error, "No request_method option specified" } @request_params = opts.fetch(:request_params){ raise DataScienceTheater3000Error, "No request_params option specified" } end |
Instance Attribute Details
#request_method ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/data_science_theater_3000/data_science_toolkit.rb', line 9 def request_method @request_method end |
#request_params ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
12 13 14 |
# File 'lib/data_science_theater_3000/data_science_toolkit.rb', line 12 def request_params @request_params end |
Instance Method Details
#result ⇒ Object
21 22 23 |
# File 'lib/data_science_theater_3000/data_science_toolkit.rb', line 21 def result @result ||= make_request end |