Module: IceCube
- Defined in:
- lib/ice_cube.rb,
lib/ice_cube/i18n.rb,
lib/ice_cube/rule.rb,
lib/ice_cube/version.rb,
lib/ice_cube/schedule.rb,
lib/ice_cube/null_i18n.rb,
lib/ice_cube/time_util.rb,
lib/ice_cube/deprecated.rb,
lib/ice_cube/occurrence.rb,
lib/ice_cube/flexible_hash.rb,
lib/ice_cube/validated_rule.rb,
lib/ice_cube/input_alignment.rb,
lib/ice_cube/validations/day.rb,
lib/ice_cube/rules/daily_rule.rb,
lib/ice_cube/validations/lock.rb,
lib/ice_cube/rules/hourly_rule.rb,
lib/ice_cube/rules/weekly_rule.rb,
lib/ice_cube/rules/yearly_rule.rb,
lib/ice_cube/validations/count.rb,
lib/ice_cube/validations/until.rb,
lib/ice_cube/rules/monthly_rule.rb,
lib/ice_cube/parsers/hash_parser.rb,
lib/ice_cube/parsers/ical_parser.rb,
lib/ice_cube/parsers/yaml_parser.rb,
lib/ice_cube/rules/minutely_rule.rb,
lib/ice_cube/rules/secondly_rule.rb,
lib/ice_cube/builders/hash_builder.rb,
lib/ice_cube/builders/ical_builder.rb,
lib/ice_cube/errors/count_exceeded.rb,
lib/ice_cube/errors/until_exceeded.rb,
lib/ice_cube/single_occurrence_rule.rb,
lib/ice_cube/builders/string_builder.rb,
lib/ice_cube/validations/day_of_week.rb,
lib/ice_cube/validations/day_of_year.rb,
lib/ice_cube/validations/fixed_value.rb,
lib/ice_cube/validations/hour_of_day.rb,
lib/ice_cube/validations/day_of_month.rb,
lib/ice_cube/validations/month_of_year.rb,
lib/ice_cube/validations/schedule_lock.rb,
lib/ice_cube/validations/daily_interval.rb,
lib/ice_cube/validations/minute_of_hour.rb,
lib/ice_cube/validations/hourly_interval.rb,
lib/ice_cube/validations/weekly_interval.rb,
lib/ice_cube/validations/yearly_interval.rb,
lib/ice_cube/validations/monthly_interval.rb,
lib/ice_cube/validations/second_of_minute.rb,
lib/ice_cube/validations/minutely_interval.rb,
lib/ice_cube/validations/secondly_interval.rb
Defined Under Namespace
Modules: Deprecated, NullI18n, TimeUtil, Validations Classes: CountExceeded, DailyRule, FlexibleHash, HashBuilder, HashParser, HourlyRule, IcalBuilder, IcalParser, InputAlignment, MinutelyRule, MonthlyRule, Occurrence, Rule, Schedule, SecondlyRule, SingleOccurrenceRule, StringBuilder, UntilExceeded, ValidatedRule, WeeklyRule, YamlParser, YearlyRule
Constant Summary collapse
- ONE_SECOND =
Define some useful constants
1
- ONE_MINUTE =
ONE_SECOND * 60
- ONE_HOUR =
ONE_MINUTE * 60
- ONE_DAY =
ONE_HOUR * 24
- ONE_WEEK =
ONE_DAY * 7
- LOCALES_PATH =
File.(File.join("..", "..", "config", "locales"), __dir__)
- I18n =
rubocop:disable Naming/ConstantName
begin require "i18n" ::I18n.load_path += Dir[File.join(LOCALES_PATH, "*.yml")] ::I18n rescue LoadError NullI18n end
- VERSION =
"0.17.0"
Class Method Summary collapse
-
.compatibility ⇒ Object
Retain backwards compatibility for schedules exported from older versions This represents the version number, 11 = 0.11, 1.0 will be 100.
- .compatibility=(version) ⇒ Object
-
.to_s_time_format ⇒ Object
Defines the format used by IceCube when printing out Schedule#to_s.
-
.to_s_time_format=(format) ⇒ Object
Sets the format used by IceCube when printing out Schedule#to_s.
Class Method Details
.compatibility ⇒ Object
Retain backwards compatibility for schedules exported from older versions This represents the version number, 11 = 0.11, 1.0 will be 100
83 84 85 |
# File 'lib/ice_cube.rb', line 83 def self.compatibility @compatibility ||= IceCube::VERSION.scan(/\d+/)[0..1].join.to_i end |
.compatibility=(version) ⇒ Object
87 88 89 |
# File 'lib/ice_cube.rb', line 87 def self.compatibility=(version) @compatibility = version end |
.to_s_time_format ⇒ Object
Defines the format used by IceCube when printing out Schedule#to_s. Defaults to ‘%B %e, %Y’
72 73 74 |
# File 'lib/ice_cube.rb', line 72 def self.to_s_time_format IceCube::I18n.t("ice_cube.date.formats.default") end |
.to_s_time_format=(format) ⇒ Object
Sets the format used by IceCube when printing out Schedule#to_s.
77 78 79 |
# File 'lib/ice_cube.rb', line 77 def self.to_s_time_format=(format) @to_s_time_format = format end |