Module: AstrologicalForecast
- Defined in:
- lib/astrological_forecast.rb,
lib/astrological_forecast/type.rb,
lib/astrological_forecast/facts.rb,
lib/astrological_forecast/errors.rb,
lib/astrological_forecast/version.rb,
lib/astrological_forecast/forecast.rb,
lib/astrological_forecast/prediction.rb,
lib/astrological_forecast/introduction.rb,
lib/astrological_forecast/definition_sign.rb
Defined Under Namespace
Modules: Facts, Introduction Classes: DefinitionSign, Forecast, IncorrectDate, IncorrectPeriod, IncorrectType, Prediction, Type
Constant Summary collapse
- OPTIONS_TYPE =
%w[Общий Любовный Семейный Карьерный Здоровье Тинейджер Флирт Друзья].freeze
- OPTIONS_PERIOD =
['На сегодня', 'На завтра', 'На неделю', 'На месяц', 'На год'].freeze
- VERSION =
'2.0.5'
Class Method Summary collapse
Class Method Details
.predict(console = false, date = nil, type = nil, period = nil) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/astrological_forecast.rb', line 9 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 |