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, indent: 0) ⇒ Object
Methods inherited from Action
Methods included from ObjectX
#action_to_object, #object_create, #varify
Methods inherited from MacroObject
Constructor Details
#initialize(h = {}) ⇒ IfConfirmedThenAction
Returns a new instance of IfConfirmedThenAction.
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/ruby-macrodroid/actions.rb', line 385 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, indent: 0) ⇒ Object
401 402 403 404 405 406 |
# File 'lib/ruby-macrodroid/actions.rb', line 401 def to_s(colour: false, indent: 0) @s = "If Confirmed Then " #+ @constraints.map(&:to_s).join(" %s " % operator) super(colour: colour) end |