Class: Temporalio::Client::Schedule::Spec::Calendar

Inherits:
Data
  • Object
show all
Defined in:
lib/temporalio/client/schedule.rb,
lib/temporalio/client/schedule.rb

Overview

Specification relative to calendar time when to run an action.

A timestamp matches if at least one range of each field matches except for year. If year is missing, that means all years match. For all fields besides year, at least one range must be present to match anything.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(second: [Range.new(0)], minute: [Range.new(0)], hour: [Range.new(0)], day_of_month: [Range.new(1, 31)], month: [Range.new(1, 12)], year: [], day_of_week: [Range.new(0, 6)], comment: nil) ⇒ Calendar

Create a calendar spec.



587
588
589
590
591
592
593
594
595
596
597
598
# File 'lib/temporalio/client/schedule.rb', line 587

def initialize(
  second: [Range.new(0)],
  minute: [Range.new(0)],
  hour: [Range.new(0)],
  day_of_month: [Range.new(1, 31)],
  month: [Range.new(1, 12)],
  year: [],
  day_of_week: [Range.new(0, 6)],
  comment: nil
)
  super
end

Instance Attribute Details

#commentString?



530
531
532
# File 'lib/temporalio/client/schedule.rb', line 530

def comment
  @comment
end

#day_of_monthArray<Range>



530
531
532
# File 'lib/temporalio/client/schedule.rb', line 530

def day_of_month
  @day_of_month
end

#day_of_weekArray<Range>



530
531
532
# File 'lib/temporalio/client/schedule.rb', line 530

def day_of_week
  @day_of_week
end

#hourArray<Range>



530
531
532
# File 'lib/temporalio/client/schedule.rb', line 530

def hour
  @hour
end

#minuteArray<Range>



530
531
532
# File 'lib/temporalio/client/schedule.rb', line 530

def minute
  @minute
end

#monthArray<Range>



530
531
532
# File 'lib/temporalio/client/schedule.rb', line 530

def month
  @month
end

#secondArray<Range>



530
531
532
# File 'lib/temporalio/client/schedule.rb', line 530

def second
  @second
end

#yearArray<Range>



530
531
532
# File 'lib/temporalio/client/schedule.rb', line 530

def year
  @year
end