Class: IfConditionAction
- Inherits:
-
Action
- Object
- MacroObject
- Action
- IfConditionAction
- Defined in:
- lib/ruby-macrodroid.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
Returns a new instance of IfConditionAction.
2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 |
# File 'lib/ruby-macrodroid.rb', line 2989 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
3005 3006 3007 3008 3009 3010 |
# File 'lib/ruby-macrodroid.rb', line 3005 def to_s(colour: false) @s = "If " #+ @constraints.map(&:to_s).join(" %s " % operator) super(colour: colour) end |