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