Class: IfConfirmedThenAction
- Inherits:
-
Action
- Object
- MacroObject
- Action
- IfConfirmedThenAction
- Defined in:
- lib/ruby-macrodroid/actions.rb
Overview
Conditions/Loops
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(h = {}) ⇒ IfConfirmedThenAction
constructor
A new instance of IfConfirmedThenAction.
- #to_s(colour: false) ⇒ Object
Methods inherited from Action
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ IfConfirmedThenAction
Returns a new instance of IfConfirmedThenAction.
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/ruby-macrodroid/actions.rb', line 280 def initialize(h={}) = { a: true, constraint_list: '' } macro = h[:macro] h2 = .merge(filter(,h).merge(macro: macro)) super(h2) @label = 'If Confirmed Then ' end |
Instance Method Details
#to_s(colour: false) ⇒ Object
296 297 298 299 300 301 |
# File 'lib/ruby-macrodroid/actions.rb', line 296 def to_s(colour: false) @s = "If Confirmed Then " #+ @constraints.map(&:to_s).join(" %s " % operator) super(colour: colour) end |