Class: USNO::Transit::WorldWideRequest

Inherits:
PayDirt::Base
  • Object
show all
Includes:
Request
Defined in:
lib/usno/transit/worldwide_request.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ WorldWideRequest

Returns a new instance of WorldWideRequest.



9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/usno/transit/worldwide_request.rb', line 9

def initialize(options = {})
  options = {
    uri: URI.parse("http://aa.usno.navy.mil/cgi-bin/aa_mrst2.pl"),
    z_meters: 0,
    days: 5,
    date: Time.now,
    lat_minutes: 0, lat_seconds: 0, long_minutes: 0, long_seconds: 0
  }.merge(options)


  load_options(:long, :lat, :days, :date, :object, options)
end

Instance Method Details

#callObject



22
23
24
# File 'lib/usno/transit/worldwide_request.rb', line 22

def call
  return result(true, request_response.body)
end