Class: HorizonEvent::Request
- Inherits:
-
PayDirt::Base
- Object
- PayDirt::Base
- HorizonEvent::Request
- Defined in:
- lib/horizon_event/request.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(options = {}) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(options = {}) ⇒ Request
Returns a new instance of Request.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/horizon_event/request.rb', line 8 def initialize( = {}) = { http_headers: { "Accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language" => "en-US,en;q=0.5", "Accept-Encoding" => "gzip, deflate", "Referer" => "http://aa.usno.navy.mil/data/docs/RS_OneYear.php" }, year: Time.now.year.to_s, city: "Birmingham", state: "AL", type: "0", ffx: "1", zzz: "END", host: "aa.usno.navy.mil", url: "http://aa.usno.navy.mil/cgi-bin/aa_rstablew.pl" }.merge() (:http_headers, :ffx, :year, :type, :state, :city, :zzz, :host, :url, ) end |
Instance Method Details
#call ⇒ Object
29 30 31 |
# File 'lib/horizon_event/request.rb', line 29 def call return result(true, request_response.body) end |