Class: ElseAction
- Inherits:
-
Action
- Object
- MacroObject
- Action
- ElseAction
- Defined in:
- lib/ruby-macrodroid/actions.rb
Instance Attribute Summary
Attributes inherited from Action
Attributes inherited from MacroObject
Instance Method Summary collapse
-
#initialize(obj = []) ⇒ ElseAction
constructor
A new instance of ElseAction.
- #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(obj = []) ⇒ ElseAction
576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 |
# File 'lib/ruby-macrodroid/actions.rb', line 576 def initialize(obj=[]) = { constraint_list: [] } if obj.is_a? Hash then h = obj super(.merge h) elsif obj.is_a? Array e, macro = obj # find any nested actions item = e.element('item') if item then ap = ActionsNlp.new obj2 = action_to_object(ap, item, item, macro) puts 'obj2: ' + obj2.inspect if $debug #macro.add obj2 end super() end end |
Instance Method Details
#to_s(colour: false, indent: 0) ⇒ Object
612 613 614 |
# File 'lib/ruby-macrodroid/actions.rb', line 612 def to_s(colour: false, indent: 0) 'Else' end |