def <<(item)
    if item.kind_of? Condition
      add_condition(item)
    elsif item.kind_of? Action
      add_action(item)
    else
      raise "Invalid item: #{item.class}"
    end
    self
  end
def <<(item)
    if item.kind_of? Condition
      add_condition(item)
    elsif item.kind_of? Action
      add_action(item)
    else
      raise "Invalid item: #{item.class}"
    end
    self
  end
True if all attributes, actions and conditions are the same.
Overloads the << operator to put the new item into the correct
list or assign it to the correct attribute.
Assignment is done based on item's class or a parent class of item.