Class: Discordrb::ScheduledEvent::RecurrenceRule::WeeklyDay
- Inherits:
-
Object
- Object
- Discordrb::ScheduledEvent::RecurrenceRule::WeeklyDay
- Defined in:
- lib/discordrb/data/scheduled_event.rb
Overview
The specific day within a specific week to recur on.
Instance Attribute Summary collapse
-
#day ⇒ Integer
readonly
The day (0-6) of the week to recur on.
-
#week ⇒ Integer
readonly
The week (1-5) to recur on in the month.
Instance Method Summary collapse
-
#friday? ⇒ true, false
Whether the day within the week is a friday.
-
#monday? ⇒ true, false
Whether the day within the week is a monday.
-
#saturday? ⇒ true, false
Whether the day within the week is a saturday.
-
#sunday? ⇒ true, false
Whether the day within the week is a sunday.
-
#thursday? ⇒ true, false
Whether the day within the week is a thursday.
-
#tuesday? ⇒ true, false
Whether the day within the week is a tuesday.
-
#wednesday? ⇒ true, false
Whether the day within the week is a wednesday.
Instance Attribute Details
#day ⇒ Integer (readonly)
Returns the day (0-6) of the week to recur on.
386 387 388 |
# File 'lib/discordrb/data/scheduled_event.rb', line 386 def day @day end |
#week ⇒ Integer (readonly)
Returns the week (1-5) to recur on in the month.
389 390 391 |
# File 'lib/discordrb/data/scheduled_event.rb', line 389 def week @week end |
Instance Method Details
#friday? ⇒ true, false
Returns whether the day within the week is a friday.
417 418 419 420 421 |
# File 'lib/discordrb/data/scheduled_event.rb', line 417 WEEKDAYS.each do |name, value| define_method("#{name}?") do @day == value end end |
#monday? ⇒ true, false
Returns whether the day within the week is a monday.
417 418 419 420 421 |
# File 'lib/discordrb/data/scheduled_event.rb', line 417 WEEKDAYS.each do |name, value| define_method("#{name}?") do @day == value end end |
#saturday? ⇒ true, false
Returns whether the day within the week is a saturday.
417 418 419 420 421 |
# File 'lib/discordrb/data/scheduled_event.rb', line 417 WEEKDAYS.each do |name, value| define_method("#{name}?") do @day == value end end |
#sunday? ⇒ true, false
Returns whether the day within the week is a sunday.
417 418 419 420 421 |
# File 'lib/discordrb/data/scheduled_event.rb', line 417 WEEKDAYS.each do |name, value| define_method("#{name}?") do @day == value end end |
#thursday? ⇒ true, false
Returns whether the day within the week is a thursday.
417 418 419 420 421 |
# File 'lib/discordrb/data/scheduled_event.rb', line 417 WEEKDAYS.each do |name, value| define_method("#{name}?") do @day == value end end |
#tuesday? ⇒ true, false
Returns whether the day within the week is a tuesday.
417 418 419 420 421 |
# File 'lib/discordrb/data/scheduled_event.rb', line 417 WEEKDAYS.each do |name, value| define_method("#{name}?") do @day == value end end |
#wednesday? ⇒ true, false
Returns whether the day within the week is a wednesday.
417 418 419 420 421 |
# File 'lib/discordrb/data/scheduled_event.rb', line 417 WEEKDAYS.each do |name, value| define_method("#{name}?") do @day == value end end |