Class: RegularIntervalTrigger
- Inherits:
-
Trigger
- Object
- MacroObject
- Trigger
- RegularIntervalTrigger
- Defined in:
- lib/ruby-macrodroid.rb
Overview
Category: Date/Time
Regular Interval
Instance Attribute Summary
Attributes inherited from Trigger
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ RegularIntervalTrigger
constructor
A new instance of RegularIntervalTrigger.
- #to_s(colour: false) ⇒ Object (also: #to_summary)
Methods inherited from Trigger
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ RegularIntervalTrigger
Returns a new instance of RegularIntervalTrigger.
1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 |
# File 'lib/ruby-macrodroid.rb', line 1998 def initialize(h={}) = { ignore_reference_start_time: false, minutes: 0, seconds: 7200, start_hour: 9, start_minute: 10, use_alarm: false } super(.merge h) end |
Instance Method Details
#to_s(colour: false) ⇒ Object Also known as: to_summary
2013 2014 2015 2016 2017 2018 2019 |
# File 'lib/ruby-macrodroid.rb', line 2013 def to_s(colour: false) interval = Subunit.new(units={minutes:60, hours:60}, \ seconds: @h[:seconds]).strfunit("%c") 'Regular Interval ' + "\n Interval: " + interval end |