class ElseAction

Public Class Methods

new(obj=[]) click to toggle source
Calls superclass method Action::new
# File lib/ruby-macrodroid/actions.rb, line 694
def initialize(obj=[])

  options = {
    constraint_list: []
  }
  
  if obj.is_a? Hash then
    
    h = obj

    super(options.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(options)
  end
  
  


end

Public Instance Methods

to_s(colour: false, indent: 0) click to toggle source
# File lib/ruby-macrodroid/actions.rb, line 730
def to_s(colour: false, indent: 0)
  'Else'
end