Class: WorldTides::Commands::Fetch
- Inherits:
-
WorldTides::Command
- Object
- WorldTides::Command
- WorldTides::Commands::Fetch
- Defined in:
- lib/world_tides/commands/fetch.rb
Instance Method Summary collapse
- #execute(input: $stdin, output: $stdout) ⇒ Object
-
#initialize(filename, lon, lat, options) ⇒ Fetch
constructor
A new instance of Fetch.
Methods inherited from WorldTides::Command
#command, #cursor, #editor, #exec_exist?, #generator, #pager, #platform, #prompt, #screen, #which
Constructor Details
#initialize(filename, lon, lat, options) ⇒ Fetch
Returns a new instance of Fetch.
8 9 10 11 12 13 |
# File 'lib/world_tides/commands/fetch.rb', line 8 def initialize(filename, lon, lat, ) @filename = filename @lon = lon @lat = lat @options = end |
Instance Method Details
#execute(input: $stdin, output: $stdout) ⇒ Object
15 16 17 18 19 |
# File 'lib/world_tides/commands/fetch.rb', line 15 def execute(input: $stdin, output: $stdout) require 'world_tides/api_wrapper' APIWrapper.new(lon: @lon, lat: @lat).highs_and_lows_csv(@filename) output.puts "OK" end |