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 MacroObject

#options, #type

Instance Method Summary collapse

Methods inherited from Trigger

#match?

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ DayTrigger

Returns a new instance of DayTrigger.



1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
# File 'lib/ruby-macrodroid.rb', line 1062

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