Class: StopWatchConstraint
- Inherits:
-
Constraint
- Object
- MacroObject
- Constraint
- StopWatchConstraint
- Defined in:
- lib/ruby-macrodroid/constraints.rb
Overview
Category: Date/Time
Instance Attribute Summary
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ StopWatchConstraint
constructor
A new instance of StopWatchConstraint.
- #to_s(colour: false, indent: 0) ⇒ Object (also: #to_summary)
Methods inherited from Constraint
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ StopWatchConstraint
Returns a new instance of StopWatchConstraint.
459 460 461 462 463 464 465 466 467 |
# File 'lib/ruby-macrodroid/constraints.rb', line 459 def initialize(h={}) = { days_of_week: [false, false, true, false, false, false, false] } super(.merge h) end |
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object Also known as: to_summary
469 470 471 472 473 |
# File 'lib/ruby-macrodroid/constraints.rb', line 469 def to_s(colour: false, indent: 0) #'StopWatchConstraint ' + @h.inspect operator = @h[:greater_than] ? '>' : '<' "%s %s %s" % [@h[:stopwatch_name], operator, @h[:variable_name] ] #+ @h.inspect end |