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.
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 |
# File 'lib/ruby-macrodroid/actions.rb', line 317 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
333 334 335 336 337 338 |
# File 'lib/ruby-macrodroid/actions.rb', line 333 def to_s(colour: false, indent: 0) @s = "If Confirmed Then " #+ @constraints.map(&:to_s).join(" %s " % operator) super(colour: colour) end |