Sha256: 4c7681426aba94388529597dcd16007afbd4503907d23593260a4db2f314a7c1

Contents?: true

Size: 540 Bytes

Versions: 8

Compression:

Stored size: 540 Bytes

Contents

# frozen_string_literal: true

require_relative 'main'

# Main Meteoservice module
module Meteoservice
  def self.result(city_index = nil)
    doc = if city_index
            Meteoservice::TownsData.auto_process(city_index.to_i)
          else
            Meteoservice::TownsData.process
          end

    puts "\e[H\e[2J"

    weather = Meteoservice::ReadData.from_array(doc[0]).to_a

    puts "#{doc[1]}\n\n"

    weather.each_with_index do |_day, index|
      puts Meteoservice::Predict.new(weather[index])
      puts
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
meteoservice-0.2.7 lib/meteoservice.rb
meteoservice-0.2.6 lib/meteoservice.rb
meteoservice-0.2.5 lib/meteoservice.rb
meteoservice-0.2.4 lib/meteoservice.rb
meteoservice-0.2.2 lib/meteoservice.rb
meteoservice-0.2.1 lib/meteoservice.rb
meteoservice-0.2.0 lib/meteoservice.rb
meteoservice-0.1.0 lib/meteoservice.rb