Class: DayTrigger

Inherits:
Trigger show all
Defined in:
lib/ruby-macrodroid.rb

Overview

Category: Date/Time

Also known as Day of Week/Month

month_of_year equal to 0 means it occurs every month day_of_week starts with a Monday (value is 0)

Instance Attribute Summary

Attributes inherited from Trigger

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Trigger

#match?

Methods inherited from MacroObject

#to_h, #to_s

Constructor Details

#initialize(h = {}) ⇒ DayTrigger

Returns a new instance of DayTrigger.



1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
# File 'lib/ruby-macrodroid.rb', line 1806

def initialize(h={})

  options = {
    alarm_id: uuid(),
    hour: 9,
    minute: 0,
    month_of_year: 0,
    option: 0,
    day_of_week: 2,
    day_of_month: 0,
    use_alarm: false
  }

  super(options.merge h)

end