Sha256: 343a12bd0591424c5770da84071f19d420f9d0e571aa307547437bd73fcc433a

Contents?: true

Size: 926 Bytes

Versions: 4

Compression:

Stored size: 926 Bytes

Contents

# frozen_string_literal: true

# Программа "Зодиакальный гороскоп" (на сегодня, на завтра, на неделю, на месяц, на год)
require_relative 'main'

BASE_URL = 'https://orakul.com/'

module AstrologicalForecast
  def self.predict(console = false, date = nil, type = nil, period = nil)
    determinant = AstrologicalForecast::DefinitionSign.new(date: date)

    characteristic = AstrologicalForecast::Type.new(type: type, period: period)

    params = {
      definition: determinant.definition,
      signs: determinant.signs,
      user_type: characteristic.user_type,
      user_period: characteristic.user_period,
      console: console
    }

    forecast = AstrologicalForecast::Forecast.new(params)

    forecast.data_forecast
  end
end

# AstrologicalForecast.predict(true, '19.05', 'общий', 'на сегодня')
# AstrologicalForecast.predict(true)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
astrological_forecast-2.0.5 lib/astrological_forecast.rb
astrological_forecast-2.0.4 lib/astrological_forecast.rb
astrological_forecast-2.0.2 lib/astrological_forecast.rb
astrological_forecast-2.0.1 lib/astrological_forecast.rb