Module: USNO::Imagery::Earth::CallWithTime

Included in:
Map, Moon, Sun
Defined in:
lib/usno/imagery/earth/call_with_time.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/usno/imagery/earth/call_with_time.rb', line 5

def self.included(base)
  def call
    result true, @usno_imagery_class.new({
      view: @view,
      time: @time || Time.now
    }).call.data
  end
end

Instance Method Details

#callObject



6
7
8
9
10
11
# File 'lib/usno/imagery/earth/call_with_time.rb', line 6

def call
  result true, @usno_imagery_class.new({
    view: @view,
    time: @time || Time.now
  }).call.data
end