Class: SetAlarmClockAction

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

Overview

Category: Date/Time

Instance Attribute Summary

Attributes inherited from Action

#constraints

Attributes inherited from MacroObject

#options, #siguid, #type

Instance Method Summary collapse

Methods inherited from Action

#invoke

Methods included from ObjectX

#action_to_object, #object_create, #varify

Methods inherited from MacroObject

#to_h

Constructor Details

#initialize(h = {}) ⇒ SetAlarmClockAction

Returns a new instance of SetAlarmClockAction.



730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
# File 'lib/ruby-macrodroid/actions.rb', line 730

def initialize(h={})

  options = {
    days_of_week: [false, false, false, false, false, false, false],
    label: 'wakeup mum',
    delay_in_minutes: 1,
    hour: 8,
    delay_in_hours: 0,
    minute: 15,
    one_off: true,
    option: 0,
    relative: true,
    day_option: 0
  }

  super(options.merge h)

end

Instance Method Details

#to_s(colour: false, indent: 0) ⇒ Object Also known as: to_summary



749
750
751
# File 'lib/ruby-macrodroid/actions.rb', line 749

def to_s(colour: false, indent: 0)
  'SetAlarmClockAction ' + @h.inspect
end